slight styling enhancements for panes
authorLukas Hrazky <lukkash@email.cz>
Sun, 22 Aug 2010 14:55:18 +0000 (16:55 +0200)
committerLukas Hrazky <lukkash@email.cz>
Sun, 22 Aug 2010 14:55:18 +0000 (16:55 +0200)
Signed-off-by: Lukas Hrazky <lukkash@email.cz>

src/addressbar.cpp
src/case.cpp
src/pane.cpp

index 54db44b..83bccd0 100644 (file)
@@ -22,7 +22,7 @@
 
 AddressBar::AddressBar(QWidget *parent) : QLineEdit(parent) {
     setMaximumHeight(60);
-    setContentsMargins(-4, -4, -4, -4);
+    setContentsMargins(-2, -4, -2, -5);
 
     connect(this, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
 }
index 721bdaf..8512601 100644 (file)
@@ -35,8 +35,8 @@ Case::Case(QWidget *parent) :
     fileOperator(new FileOperator(this))
 {
     QVBoxLayout *layout = new QVBoxLayout;
-    layout->setContentsMargins(0, 0, 0, 0);
-    layout->setSpacing(0);
+    layout->setContentsMargins(0, 1, 0, 0);
+    layout->setSpacing(1);
 
     QHBoxLayout *paneLayout = new QHBoxLayout;
     paneLayout->setContentsMargins(0, 0, 0, 0);
index 4b192a3..34bdd6e 100644 (file)
@@ -37,14 +37,13 @@ Pane::Pane(QWidget *theCase, QWidget *parent) :
     fileList(new FileList)
 {
     QVBoxLayout *layout = new QVBoxLayout;
-    layout->setContentsMargins(3, 3, 3, 3);
+    layout->setContentsMargins(2, 1, 2, 2);
     layout->setSpacing(0);
     setLayout(layout);
 
     QHBoxLayout *topLine = new QHBoxLayout;
 
     location->setText(fileList->path());
-    layout->setSpacing(0);
 
     topLine->addWidget(location);
     topLine->addWidget(up);
@@ -76,12 +75,11 @@ const QFileInfoList Pane::selection() const {
 void Pane::paintEvent(QPaintEvent *) {
     if (active) {
         QPainter painter(this);
-        painter.setPen(palette().color(QPalette::Highlight));
+        painter.setPen(palette().highlight().color());
         QRect g = this->geometry();
-        g.moveTo(1, 1);
-        g.setWidth(g.width() - 3);
-        g.setHeight(g.height() - 3);
-        painter.drawRect(g);
+        g.moveTo(0, 0);
+        g.adjust(0, 0, -1, -1);
+        painter.drawRoundedRect(g, 3, 3);
     }
 }