forked from MirrorStudio-devTeam/panda-qt5-plugin
-
Notifications
You must be signed in to change notification settings - Fork 4
/
stylesheet.qss
128 lines (107 loc) · 4.82 KB
/
stylesheet.qss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/* https://doc.qt.io/qt-5/stylesheet-customizing.html */
/* https://doc.qt.io/qt-5/stylesheet-examples.html */
/* https://github.com/nphase/qt-ping-grapher/blob/master/resources/darkorange.stylesheet */
/* FIXME: Would like a gradient from #e7e8eb to #f7f7f7
/* but running into a black background issue:
/* https://forum.qt.io/topic/90348/setting-qlineargradient-with-stylesheet-always-shows-black/3 */
QToolBar {
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #7c90ff, stop: 0.1 #6f84f1, stop: 0.9 #4655f0, stop: 1 #3b44ab);
background-color: #e7e8eb;
}
QStatusBar {
background-color: #e7e8eb;
}
QProgressBar {
height: 20px;
background-color: white;
text-align: center;
color: transparent; /* The percentage text */
}
/* FIXME: We end up with a black background for the QProgressBar and the text is no longer centered. Why? Probably because if we start customizing some aspects of a complex widget like QProgressBar, we need to customize ALL of them */
/* Make default QPushButtons blue. Works */
QPushButton[default="true"], QProgressBar::chunk {
color: white;
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #9595d3, stop: 0.1 #b9cbf9, stop: 0.39 #69ace3, stop: 0.4 #4c95d9, stop: 1 #8dd2fb);
}
/* Make QPushButtons yellowish glowing when hovered over. Works */
/* Note that the order matters, so if we want default buttons to have the hover effect we need to do the hover effect after the default button stuff */
QPushButton:hover {
/* color: red; */
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fff, stop: 0.1 #ddd, stop: 0.39 #eef, stop: 0.4 #ddb, stop: 1 #fff);
color: black;
}
/* Seems to work but if we start customizing some aspects, we need to customize ALL of them */
QPushButton {
font-size: 11.5pt;
height: 20px;
padding-top: 1px;
padding-bottom: 0px;
padding-left: 20px;
padding-right: 20px;
border-radius: 11px; /* If we make this too large, then we get no rounded corners at all... why? */
border-width: 1px;
border-style: solid;
border-color: grey;
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fff, stop: 0.1 #ddd, stop: 0.39 #eee, stop: 0.4 #ccc, stop: 1 #fff);
}
/* FIXME: Seems not to work yet. We want more space between the Cancel, OK,... buttons in dialog boxes and the text above them */
QDialogButtonBox {
margin-top: 30px;
padding-top: 30px;
}
/* Works: Set selected items (e.g., selected text, selected list view items,...) to white text with intensive blue background */
QWidget {
show-decoration-selected: 1;
selection-color: white;
selection-background-color: #336fc9; /* Intensive blue */
alternate-background-color: #eef1f5;
}
/* Menubar, menus, and menu items */
/* https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qmenubar */
QMenu::item:pressed, QMenuBar::item:pressed, QMenu::item:selected {
color: white;
background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #7c90ff, stop: 0.1 #6f84f1, stop: 0.9 #4655f0, stop: 1 #3b44ab); /* Intensive blue */
}
QMenuBar, QMenuBar::item {
background: transparent; /* Otherwise it gets colored when hovering */
}
QMenu, QMenu::item {
background: #eee;
}
/* Filer left-hand pane, FIXME: Does not work (DOES work in qt-creator GUI editor!) */
/* TODO: Check Filer with https://github.com/robertknight/Qt-Inspector or GammaRay on Linux */
QObject[objectName="sidePane"] {
background-color: yellow;
}
/* 'searchLineEdit->setObjectName("actionSearch");' is used in source code (DOES work!) */
/* FIXME: are we using setStyleSheet in the source code somewhere, ovveriding parts of this? */
QLineEdit#actionSearch {
border-radius: 0px; /* FIXME: Does not work, why? */
background-color: transparent; /* Works */
padding-left: 10px; /* Works */
padding-right: 10px; /* Works */
height: 100%; /* Works */
border-width: 0px; /* Works */
border-style: solid;
border-color: grey;
}
QLineEdit#actionSearch:focus {
color: white; /* The text */
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #7c90ff, stop: 0.1 #6f84f1, stop: 0.9 #4655f0, stop: 1 #3b44ab); /* Like menu */
height: 100%; /* Works */
}
QListView#actionCompleterPopup {
background: #eee; /* Works */
selection-background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #7c90ff, stop: 0.1 #6f84f1, stop: 0.9 #4655f0, stop: 1 #3b44ab); /* Works, Intensive blue */
}
/* FIXME: Works for other QListViews but not the one in Action Search. Why?
QListView::item {
padding: 10px;
}
QListView::item:hover {
background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #7c90ff, stop: 0.1 #6f84f1, stop: 0.9 #4655f0, stop: 1 #3b44ab);
}
*/
MainWindow#menuBar {
background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fff, stop: 0.1 #eee, stop: 0.39 #eee, stop: 0.4 #ddd, stop: 0.954 #eee, stop: 1 #bbb);
}