mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge remote-tracking branch 'origin/bstoeger-gnome'
This commit is contained in:
commit
eb59d426d1
5 changed files with 0 additions and 63 deletions
|
@ -1,7 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "TabDiveEquipment.h"
|
||||
#include "maintab.h"
|
||||
#include "desktop-widgets/simplewidgets.h" // For isGnome3Session()
|
||||
#include "desktop-widgets/modeldelegates.h"
|
||||
#include "core/dive.h"
|
||||
#include "core/selection.h"
|
||||
|
@ -51,14 +50,6 @@ TabDiveEquipment::TabDiveEquipment(QWidget *parent) : TabBase(parent),
|
|||
connect(cylindersModel, &CylindersModel::divesEdited, this, &TabDiveEquipment::divesEdited);
|
||||
connect(weightModel, &WeightModel::divesEdited, this, &TabDiveEquipment::divesEdited);
|
||||
|
||||
// Current display of things on Gnome3 looks like shit, so
|
||||
// let's fix that.
|
||||
if (isGnome3Session()) {
|
||||
QPalette p;
|
||||
p.setColor(QPalette::Window, QColor(Qt::white));
|
||||
ui.scrollArea->viewport()->setPalette(p);
|
||||
}
|
||||
|
||||
ui.cylinders->view()->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate(this));
|
||||
ui.cylinders->view()->setItemDelegateForColumn(CylindersModel::USE, new TankUseDelegate(this));
|
||||
ui.cylinders->view()->setItemDelegateForColumn(CylindersModel::SENSORS, new SensorDelegate(this));
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "TabDiveSite.h"
|
||||
|
||||
#include "core/selection.h"
|
||||
#include "desktop-widgets/simplewidgets.h" // for isGnome3Session()
|
||||
#include "qt-models/diveplannermodel.h"
|
||||
|
||||
#include <QShortcut>
|
||||
|
@ -63,33 +62,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
else
|
||||
setDocumentMode(false);
|
||||
|
||||
// Current display of things on Gnome3 looks like shit, so
|
||||
// let's fix that.
|
||||
if (isGnome3Session()) {
|
||||
// TODO: Either do this for all scroll areas or none
|
||||
//QPalette p;
|
||||
//p.setColor(QPalette::Window, QColor(Qt::white));
|
||||
//ui.scrollArea->viewport()->setPalette(p);
|
||||
|
||||
// GroupBoxes in Gnome3 looks like I'v drawn them...
|
||||
static const QString gnomeCss = QStringLiteral(
|
||||
"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 #E0E0E0, stop: 1 #FFFFFF);"
|
||||
"}");
|
||||
for (QGroupBox *box: findChildren<QGroupBox *>())
|
||||
box->setStyleSheet(gnomeCss);
|
||||
}
|
||||
// QLineEdit and QLabels should have minimal margin on the left and right but not waste vertical space
|
||||
QMargins margins(3, 2, 1, 0);
|
||||
for (QLabel *label: findChildren<QLabel *>())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue