mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Make Gnome3 be bearable
The layout of Subsurface on Gnome 3 had a few flaws, since Qt and Gtk are not really compatible. This implements a CSS that makes the use of Gnome 3 more pleasant to the eyes. Fixes #318 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
07c63c511b
commit
66716b5297
1 changed files with 21 additions and 0 deletions
|
@ -108,6 +108,27 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
ui.scrollArea_2->viewport()->setPalette(p);
|
||||
ui.scrollArea_3->viewport()->setPalette(p);
|
||||
ui.scrollArea_4->viewport()->setPalette(p);
|
||||
|
||||
// GroupBoxes in Gnome3 looks like I'v drawn them...
|
||||
static const QString gnomeCss(
|
||||
"QGroupBox {"
|
||||
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
|
||||
" stop: 0 #E0E0E0, stop: 1 #FFFFFF);"
|
||||
" border: 2px solid gray;"
|
||||
" border-radius: 5px;"
|
||||
" margin-top: 1ex;"
|
||||
"}"
|
||||
"QGroupBox::title {"
|
||||
" subcontrol-origin: margin;"
|
||||
" subcontrol-position: top center;"
|
||||
" padding: 0 3px;"
|
||||
" background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
|
||||
" stop: 0 #0E0E0, stop: 1 #FFFFFF);"
|
||||
"}");
|
||||
Q_FOREACH(QGroupBox *box, findChildren<QGroupBox*>()){
|
||||
box->setStyleSheet(gnomeCss);
|
||||
}
|
||||
|
||||
}
|
||||
ui.cylinders->view()->horizontalHeader()->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
|
|
Loading…
Reference in a new issue