diff options
author | Ken Moore <ken@pcbsd.org> | 2015-04-25 11:09:29 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-04-25 11:09:29 -0400 |
commit | e984eae6bcdfc08ddb554f654428535303884192 (patch) | |
tree | cfe190f7f2a69294e4bb5133909289f8a69ca4db /lumina-desktop | |
parent | Oops, accidentally committed a change to the desktop init process (reverted b... (diff) | |
download | lumina-e984eae6bcdfc08ddb554f654428535303884192.tar.gz lumina-e984eae6bcdfc08ddb554f654428535303884192.tar.bz2 lumina-e984eae6bcdfc08ddb554f654428535303884192.zip |
For "hidden" panels, make the amount visible 1% of the total panel size (with a minimum of 2 pixels). This lets it scale much better on large resolution screens).
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LPanel.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp index e301ad29..d3b530ff 100644 --- a/lumina-desktop/LPanel.cpp +++ b/lumina-desktop/LPanel.cpp @@ -109,6 +109,8 @@ void LPanel::UpdatePanel(){ layout->setDirection(QBoxLayout::TopToBottom); } int ht = settings->value(PPREFIX+"height", 30).toInt(); //this is technically the distance into the screen from the edge + int hidesize = qRound(ht*0.01); //use 1% of the panel size + if(hidesize<2){ hidesize=2; } //minimum of 2 pixels (need space for the mouse to go over it) //qDebug() << " - set Geometry"; int xwid = screen->screenGeometry(screennum).width(); int xhi = screen->screenGeometry(screennum).height(); @@ -121,8 +123,8 @@ void LPanel::UpdatePanel(){ this->setGeometry(xloc,0,xwid, ht ); if(!hidden){ LX11::ReservePanelLocation(this->winId(), xloc, 0, this->width(), ht, "top"); } else{ - LX11::ReservePanelLocation(this->winId(), xloc, 0, this->width(), 2, "top"); - hidepoint = QPoint(xloc, 2-ht); + LX11::ReservePanelLocation(this->winId(), xloc, 0, this->width(), hidesize, "top"); + hidepoint = QPoint(xloc, hidesize-ht); showpoint = QPoint(xloc, 0); this->move(hidepoint); //Could bleed over onto the screen above } @@ -133,8 +135,8 @@ void LPanel::UpdatePanel(){ this->setGeometry(xloc,xhi-ht,xwid, ht ); if(!hidden){ LX11::ReservePanelLocation(this->winId(), xloc, xhi-ht, this->width(), ht, "bottom"); } else{ - LX11::ReservePanelLocation(this->winId(), xloc, xhi-2, this->width(), 2, "bottom"); - hidepoint = QPoint(xloc, xhi-2); + LX11::ReservePanelLocation(this->winId(), xloc, xhi-hidesize, this->width(), hidesize, "bottom"); + hidepoint = QPoint(xloc, xhi-hidesize); showpoint = QPoint(xloc, xhi-ht); this->move(hidepoint); //Could bleed over onto the screen below } @@ -145,8 +147,8 @@ void LPanel::UpdatePanel(){ this->setGeometry(xloc,0, ht, xhi); if(!hidden){ LX11::ReservePanelLocation(this->winId(), xloc, 0, ht, xhi, "left"); } else{ - LX11::ReservePanelLocation(this->winId(), xloc, 0, 2, xhi, "left"); - hidepoint = QPoint(xloc-ht+2, 0); + LX11::ReservePanelLocation(this->winId(), xloc, 0, hidesize, xhi, "left"); + hidepoint = QPoint(xloc-ht+hidesize, 0); showpoint = QPoint(xloc, 0); this->move(hidepoint); //Could bleed over onto the screen left } @@ -157,8 +159,8 @@ void LPanel::UpdatePanel(){ this->setGeometry(xloc+xwid-ht,0,ht, xhi); if(!hidden){ LX11::ReservePanelLocation(this->winId(), xloc+xwid-ht, 0, ht, xhi, "right"); } else{ - LX11::ReservePanelLocation(this->winId(), xloc+xwid-2, 0, 2, xhi, "right"); - hidepoint = QPoint(xloc+xwid-2, 0); + LX11::ReservePanelLocation(this->winId(), xloc+xwid-hidesize, 0, hidesize, xhi, "right"); + hidepoint = QPoint(xloc+xwid-hidesize, 0); showpoint = QPoint(xloc+xwid-ht, 0); this->move(hidepoint); //Could bleed over onto the screen right } |