프로젝트

일반

사용자정보

개정판 dbc1b32f

IDdbc1b32fbbaad033c0d1ecb62f5888a1ac8b3a31
상위 1158dce2
하위 c683d8f9, e1fc4ea9

백흠경이(가) 6년 이상 전에 추가함

issue #676:
- upload americano.qss, pagefold.qss file
- User can select stylesheet through menu

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
3 3
import sys
4 4
import os
5 5
import subprocess
6
from functools import partial
6 7

  
7 8
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
8 9
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '\\Commands')
......
200 201
    
201 202
        self.resizeDocks({self.dockWidget}, {self.dockWidgetObjectExplorer.sizeHint().width()}, Qt.Horizontal)
202 203

  
204
        # load stylesheet file list
205
        files = [os.path.splitext(file)[0] for file in os.listdir(os.path.dirname(os.path.realpath(__file__))) if os.path.splitext(file)[1] == '.qss']
206
        for file in files:
207
            action = self.menuTheme.addAction(file)
208
            action.triggered.connect(partial(self.load_stylesheet, file))
209
        # up to here
210

  
211
    def load_stylesheet(self, file):
212
        """
213
        @brief  load stylesheets
214
        @author humkyung
215
        @date   2018.10.29
216
        """
217

  
218
        QtWidgets.qApp.loadStyleSheet(os.path.join(os.path.dirname(os.path.realpath(__file__)), file))
219

  
203 220
    def onShowDetectSymbol(self):
204 221
        from DetectSymbolDialog import QDetectSymbolDialog
205 222

  
DTI_PID/DTI_PID/MainWindow_UI.py
1 1
# -*- coding: utf-8 -*-
2 2

  
3
# Form implementation generated from reading ui file './UI/MainWindow.ui'
3
# Form implementation generated from reading ui file '.\UI\MainWindow.ui'
4 4
#
5
# Created by: PyQt5 UI code generator 5.11.2
5
# Created by: PyQt5 UI code generator 5.11.3
6 6
#
7 7
# WARNING! All changes made in this file will be lost!
8 8

  
......
31 31
        self.menubar.setObjectName("menubar")
32 32
        self.menu = QtWidgets.QMenu(self.menubar)
33 33
        self.menu.setObjectName("menu")
34
        self.menuTheme = QtWidgets.QMenu(self.menu)
35
        self.menuTheme.setObjectName("menuTheme")
34 36
        self.menu_2 = QtWidgets.QMenu(self.menubar)
35 37
        self.menu_2.setObjectName("menu_2")
36 38
        self.menu_3 = QtWidgets.QMenu(self.menubar)
......
339 341
        self.actionOCR_Training.setObjectName("actionOCR_Training")
340 342
        self.actionOCR_Training_Editor = QtWidgets.QAction(MainWindow)
341 343
        self.actionOCR_Training_Editor.setObjectName("actionOCR_Training_Editor")
344
        self.actioncoffee = QtWidgets.QAction(MainWindow)
345
        self.actioncoffee.setObjectName("actioncoffee")
342 346
        self.menu.addAction(self.actionOpen)
343 347
        self.menu.addAction(self.actionArea)
344 348
        self.menu.addAction(self.actionConfiguration)
345 349
        self.menu.addSeparator()
350
        self.menu.addAction(self.menuTheme.menuAction())
351
        self.menu.addSeparator()
346 352
        self.menu.addAction(self.actionClose)
347 353
        self.menu_2.addAction(self.actionHMB_DATA)
348 354
        self.menu_2.addAction(self.actionItem_Data_List)
......
386 392
        _translate = QtCore.QCoreApplication.translate
387 393
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
388 394
        self.menu.setTitle(_translate("MainWindow", "파일"))
395
        self.menuTheme.setTitle(_translate("MainWindow", "테마"))
389 396
        self.menu_2.setTitle(_translate("MainWindow", "데이타"))
390 397
        self.menu_3.setTitle(_translate("MainWindow", "보기"))
391 398
        self.menu_4.setTitle(_translate("MainWindow", "툴"))
......
444 451
        self.actionReplaceText.setText(_translate("MainWindow", "텍스트 변경"))
445 452
        self.actionOCR_Training.setText(_translate("MainWindow", "OCR Training"))
446 453
        self.actionOCR_Training_Editor.setText(_translate("MainWindow", "OCR Training Editor"))
454
        self.actioncoffee.setText(_translate("MainWindow", "coffee"))
447 455

  
448 456
import MainWindow_rc
449 457

  
DTI_PID/DTI_PID/UI/MainWindow.ui
44 44
    <property name="title">
45 45
     <string>파일</string>
46 46
    </property>
47
    <widget class="QMenu" name="menuTheme">
48
     <property name="title">
49
      <string>테마</string>
50
     </property>
51
    </widget>
47 52
    <addaction name="actionOpen"/>
48 53
    <addaction name="actionArea"/>
49 54
    <addaction name="actionConfiguration"/>
50 55
    <addaction name="separator"/>
56
    <addaction name="menuTheme"/>
57
    <addaction name="separator"/>
51 58
    <addaction name="actionClose"/>
52 59
   </widget>
53 60
   <widget class="QMenu" name="menu_2">
......
719 726
    <string>OCR Training Editor</string>
720 727
   </property>
721 728
  </action>
729
  <action name="actioncoffee">
730
   <property name="text">
731
    <string>coffee</string>
732
   </property>
733
  </action>
722 734
 </widget>
723 735
 <resources>
724 736
  <include location="../res/MainWindow.qrc"/>
DTI_PID/DTI_PID/americano.qss
1
QToolTip
2
{
3
     border: 1px solid black;
4
     background-color: #ffa02f;
5
     padding: 1px;
6
     border-radius: 3px;
7
     opacity: 100;
8
}
9

  
10
QWidget
11
{
12
    color: #b1b1b1;
13
    background-color: #323232;
14
}
15

  
16
QWidget:item:hover
17
{
18
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #ca0619);
19
    color: #000000;
20
}
21

  
22
QWidget:item:selected
23
{
24
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
25
}
26

  
27
QMenuBar::item
28
{
29
    background: transparent;
30
}
31

  
32
QMenuBar::item:selected
33
{
34
    background: transparent;
35
    border: 1px solid #ffaa00;
36
}
37

  
38
QMenuBar::item:pressed
39
{
40
    background: #444;
41
    border: 1px solid #000;
42
    background-color: QLinearGradient(
43
        x1:0, y1:0,
44
        x2:0, y2:1,
45
        stop:1 #212121,
46
        stop:0.4 #343434/*,
47
        stop:0.2 #343434,
48
        stop:0.1 #ffaa00*/
49
    );
50
    margin-bottom:-1px;
51
    padding-bottom:1px;
52
}
53

  
54
QMenu
55
{
56
    border: 1px solid #000;
57
}
58

  
59
QMenu::item
60
{
61
    padding: 2px 20px 2px 20px;
62
}
63

  
64
QMenu::item:selected
65
{
66
    color: #000000;
67
}
68

  
69
QWidget:disabled
70
{
71
    color: #404040;
72
    background-color: #323232;
73
}
74

  
75
QAbstractItemView
76
{
77
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0.1 #646464, stop: 1 #5d5d5d);
78
}
79

  
80
QWidget:focus
81
{
82
    /*border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);*/
83
}
84

  
85
QTableWidget {
86
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0 #646464, stop: 1 #5d5d5d);
87
    selection-color: #0a214c; 
88
    selection-background-color: #C19A6B;
89
    border: 1px solid #1e1e1e;
90
}
91

  
92
QLineEdit
93
{
94
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4d4d4d, stop: 0 #646464, stop: 1 #5d5d5d);
95
    padding: 1px;
96
    border-style: solid;
97
    border: 1px solid #1e1e1e;
98
    border-radius: 5;
99
}
100

  
101
QPushButton
102
{
103
    color: #b1b1b1;
104
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646);
105
    border-width: 1px;
106
    border-color: #1e1e1e;
107
    border-style: solid;
108
    border-radius: 6;
109
    padding: 3px;
110
    font-size: 12px;
111
    padding-left: 5px;
112
    padding-right: 5px;
113
}
114

  
115
QPushButton:pressed
116
{
117
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2d2d2d, stop: 0.1 #2b2b2b, stop: 0.5 #292929, stop: 0.9 #282828, stop: 1 #252525);
118
}
119

  
120
QComboBox
121
{
122
    selection-background-color: #ffaa00;
123
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646);
124
    border-style: solid;
125
    border: 1px solid #1e1e1e;
126
    border-radius: 5;
127
}
128

  
129
QComboBox:hover,QPushButton:hover
130
{
131
    border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
132
}
133

  
134

  
135
QComboBox:on
136
{
137
    padding-top: 3px;
138
    padding-left: 4px;
139
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2d2d2d, stop: 0.1 #2b2b2b, stop: 0.5 #292929, stop: 0.9 #282828, stop: 1 #252525);
140
    selection-background-color: #ffaa00;
141
}
142

  
143
QComboBox QAbstractItemView
144
{
145
    border: 2px solid darkgray;
146
    selection-background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
147
}
148

  
149
QComboBox::drop-down
150
{
151
     subcontrol-origin: padding;
152
     subcontrol-position: top right;
153
     width: 15px;
154

  
155
     border-left-width: 0px;
156
     border-left-color: darkgray;
157
     border-left-style: solid; /* just a single line */
158
     border-top-right-radius: 3px; /* same radius as the QComboBox */
159
     border-bottom-right-radius: 3px;
160
 }
161

  
162
QComboBox::down-arrow
163
{
164
     image: url(:/down_arrow.png);
165
}
166

  
167
QGroupBox:focus
168
{
169
border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
170
}
171

  
172
QTextEdit:focus
173
{
174
    border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
175
}
176

  
177
QScrollBar:horizontal {
178
     border: 1px solid #222222;
179
     background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
180
     height: 7px;
181
     margin: 0px 16px 0 16px;
182
}
183

  
184
QScrollBar::handle:horizontal
185
{
186
      background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f);
187
      min-height: 20px;
188
      border-radius: 2px;
189
}
190

  
191
QScrollBar::add-line:horizontal {
192
      border: 1px solid #1b1b19;
193
      border-radius: 2px;
194
      background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a);
195
      width: 14px;
196
      subcontrol-position: right;
197
      subcontrol-origin: margin;
198
}
199

  
200
QScrollBar::sub-line:horizontal {
201
      border: 1px solid #1b1b19;
202
      border-radius: 2px;
203
      background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ffa02f, stop: 1 #d7801a);
204
      width: 14px;
205
     subcontrol-position: left;
206
     subcontrol-origin: margin;
207
}
208

  
209
QScrollBar::right-arrow:horizontal, QScrollBar::left-arrow:horizontal
210
{
211
      border: 1px solid black;
212
      width: 1px;
213
      height: 1px;
214
      background: white;
215
}
216

  
217
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
218
{
219
      background: none;
220
}
221

  
222
QScrollBar:vertical
223
{
224
      background: QLinearGradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0.0 #121212, stop: 0.2 #282828, stop: 1 #484848);
225
      width: 7px;
226
      margin: 16px 0 16px 0;
227
      border: 1px solid #222222;
228
}
229

  
230
QScrollBar::handle:vertical
231
{
232
      background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 0.5 #d7801a, stop: 1 #ffa02f);
233
      min-height: 20px;
234
      border-radius: 2px;
235
}
236

  
237
QScrollBar::add-line:vertical
238
{
239
      border: 1px solid #1b1b19;
240
      border-radius: 2px;
241
      background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
242
      height: 14px;
243
      subcontrol-position: bottom;
244
      subcontrol-origin: margin;
245
}
246

  
247
QScrollBar::sub-line:vertical
248
{
249
      border: 1px solid #1b1b19;
250
      border-radius: 2px;
251
      background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #d7801a, stop: 1 #ffa02f);
252
      height: 14px;
253
      subcontrol-position: top;
254
      subcontrol-origin: margin;
255
}
256

  
257
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical
258
{
259
      border: 1px solid black;
260
      width: 1px;
261
      height: 1px;
262
      background: white;
263
}
264

  
265

  
266
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical
267
{
268
      background: none;
269
}
270

  
271
QTextEdit
272
{
273
    background-color: #242424;
274
}
275

  
276
QPlainTextEdit
277
{
278
    background-color: #242424;
279
}
280

  
281
QHeaderView::section
282
{
283
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #616161, stop: 0.5 #505050, stop: 0.6 #434343, stop:1 #656565);
284
    color: white;
285
    padding-left: 4px;
286
    border: 1px solid #6c6c6c;
287
}
288

  
289
QCheckBox:disabled
290
{
291
color: #414141;
292
}
293

  
294
QDockWidget::title
295
{
296
    text-align: center;
297
    spacing: 3px; /* spacing between items in the tool bar */
298
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232);
299
}
300

  
301
QDockWidget::close-button, QDockWidget::float-button
302
{
303
    text-align: center;
304
    spacing: 1px; /* spacing between items in the tool bar */
305
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #323232, stop: 0.5 #242424, stop:1 #323232);
306
}
307

  
308
QDockWidget::close-button:hover, QDockWidget::float-button:hover
309
{
310
    background: #242424;
311
}
312

  
313
QDockWidget::close-button:pressed, QDockWidget::float-button:pressed
314
{
315
    padding: 1px -1px -1px 1px;
316
}
317

  
318
QMainWindow::separator
319
{
320
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434);
321
    color: white;
322
    padding-left: 4px;
323
    border: 1px solid #4c4c4c;
324
    spacing: 3px; /* spacing between items in the tool bar */
325
}
326

  
327
QMainWindow::separator:hover
328
{
329

  
330
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #d7801a, stop:0.5 #b56c17 stop:1 #ffa02f);
331
    color: white;
332
    padding-left: 4px;
333
    border: 1px solid #6c6c6c;
334
    spacing: 3px; /* spacing between items in the tool bar */
335
}
336

  
337
QToolBar::handle
338
{
339
     spacing: 3px; /* spacing between items in the tool bar */
340
     background: url(:/images/handle.png);
341
}
342

  
343
QMenu::separator
344
{
345
    height: 2px;
346
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434);
347
    color: white;
348
    padding-left: 4px;
349
    margin-left: 10px;
350
    margin-right: 5px;
351
}
352

  
353
QProgressBar
354
{
355
    border: 2px solid grey;
356
    border-radius: 5px;
357
    text-align: center;
358
}
359

  
360
QProgressBar::chunk
361
{
362
    background-color: #d7801a;
363
    width: 2.15px;
364
    margin: 0.5px;
365
}
366

  
367
QTabBar::tab {
368
    color: #b1b1b1;
369
    border: 1px solid #444;
370
    border-bottom-style: none;
371
    background-color: #323232;
372
    padding-left: 10px;
373
    padding-right: 10px;
374
    padding-top: 3px;
375
    padding-bottom: 2px;
376
    margin-right: -1px;
377
}
378

  
379
QTabWidget::pane {
380
    border: 1px solid #444;
381
    top: 1px;
382
}
383

  
384
QTabBar::tab:last
385
{
386
    margin-right: 0; /* the last selected tab has nothing to overlap with on the right */
387
    border-top-right-radius: 3px;
388
}
389

  
390
QTabBar::tab:first:!selected
391
{
392
 margin-left: 0px; /* the last selected tab has nothing to overlap with on the right */
393

  
394

  
395
    border-top-left-radius: 3px;
396
}
397

  
398
QTabBar::tab:!selected
399
{
400
    color: #b1b1b1;
401
    border-bottom-style: solid;
402
    margin-top: 3px;
403
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:.4 #343434);
404
}
405

  
406
QTabBar::tab:selected
407
{
408
    border-top-left-radius: 3px;
409
    border-top-right-radius: 3px;
410
    margin-bottom: 0px;
411
}
412

  
413
QTabBar::tab:!selected:hover
414
{
415
    /*border-top: 2px solid #ffaa00;
416
    padding-bottom: 3px;*/
417
    border-top-left-radius: 3px;
418
    border-top-right-radius: 3px;
419
    background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:1 #212121, stop:0.4 #343434, stop:0.2 #343434, stop:0.1 #ffaa00);
420
}
421

  
422
QRadioButton::indicator:checked, QRadioButton::indicator:unchecked{
423
    color: #b1b1b1;
424
    background-color: #323232;
425
    border: 1px solid #b1b1b1;
426
    border-radius: 6px;
427
}
428

  
429
QRadioButton::indicator:checked
430
{
431
    background-color: qradialgradient(
432
        cx: 0.5, cy: 0.5,
433
        fx: 0.5, fy: 0.5,
434
        radius: 1.0,
435
        stop: 0.25 #ffaa00,
436
        stop: 0.3 #323232
437
    );
438
}
439

  
440
QCheckBox::indicator{
441
    color: #b1b1b1;
442
    background-color: #323232;
443
    border: 1px solid #b1b1b1;
444
    width: 9px;
445
    height: 9px;
446
}
447

  
448
QRadioButton::indicator
449
{
450
    border-radius: 6px;
451
}
452

  
453
QRadioButton::indicator:hover, QCheckBox::indicator:hover
454
{
455
    border: 1px solid #ffaa00;
456
}
457

  
458
QCheckBox::indicator:checked
459
{
460
    image:url(:/images/checkbox.png);
461
}
462

  
463
QCheckBox::indicator:disabled, QRadioButton::indicator:disabled
464
{
465
    border: 1px solid #444;
466
}
DTI_PID/DTI_PID/pagefold.qss
1
/* Customize any plain widget that is a child of a QMainWindow. */
2
QMainWindow > .QWidget {
3
    background-color: gainsboro;
4
    background-image: url(:/images/pagefold.png);
5
    background-position: top right;
6
    background-repeat: no-repeat
7
}
8

  
9
/* Provide a padding for the layout inside the frame. The frame
10
   exists only to provide a padding for the top-right image, so we
11
   explicitly disable the border. */
12
#mainFrame {
13
    padding-right: 30px;
14
    border-style: none;
15
    border-image: none; /* since we set a border-image below */
16
}
17

  
18
/* mainFrame won't have this border-image since we have
19
   explicitly set it to 'none' using a more specific selector. */
20
QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox {
21
    border-image: url(:/images/frame.png) 4;
22
    border-width: 3;
23
}
24

  
25
QLabel {
26
    border: none;
27
    border-image: none;
28
    padding: 0;
29
    background: none;
30
}
31

  
32
/* Make text in message boxes selectable. */
33
QMessageBox {
34
    /* LinksAccessibleByMouse | TextSelectableByMouse */
35
    messagebox-text-interaction-flags: 5;
36
}
37
   
38
/* Set the selection colors for all widgets. */
39
QWidget {
40
    selection-color: black;
41
    selection-background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
42
    color: black;
43
}
44

  
45
QWidget:focus
46
{
47
    border: 2px solid QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #d7801a);
48
}
49

  
50
/* Make the entire row selected in item views. */
51
QAbstractItemView {
52
    show-decoration-selected: 1;
53
}
54

  
55
/* Nice WindowsXP-style password character for password line edits. */
56
QLineEdit[echoMode="2"] {
57
    lineedit-password-character: 9679;
58
}
59

  
60
/* Customize tooltips. */
61
QToolTip {
62
    background-color: rgb(200,200,255);
63
    border-color: darkslategray;
64
    border-width: 1px;
65
    border-style: solid;
66
    padding: 3px;
67
    font: bold;
68
    border-radius: 3px;
69
    opacity: 200;
70
}
71

  
72
/* Customize radio buttons. */
73

  
74
QRadioButton {
75
    spacing: 5px;
76
}
77

  
78
QRadioButton::indicator {
79
    width: 13px;
80
    height: 13px;
81
}
82

  
83
QRadioButton::indicator::unchecked {
84
    image: url(:/images/radiobutton_unchecked.png);
85
}
86

  
87
QRadioButton::indicator:unchecked:hover {
88
    image: url(:/images/radiobutton_unchecked_hover.png);
89
}
90

  
91
QRadioButton::indicator:unchecked:pressed {
92
    image: url(:/images/radiobutton_unchecked_pressed.png);
93
}
94

  
95
QRadioButton::indicator::checked {
96
    image: url(:/images/radiobutton_checked.png);
97
}
98

  
99
QRadioButton::indicator:checked:hover {
100
    image: url(:/images/radiobutton_checked_hover.png);
101
}
102

  
103
QRadioButton::indicator:checked:pressed {
104
    image: url(:/images/radiobutton_checked_pressed.png);
105
}
106

  
107
/* Customize arrows. */
108

  
109
*::down-arrow, *::menu-indicator {
110
    image: url(:/images/down_arrow.png);
111
    width: 7px;
112
    height: 7px;
113
}
114

  
115
*::down-arrow:disabled, *::down-arrow:off {
116
   image: url(:/images/down_arrow_disabled.png);
117
}
118

  
119
*::up-arrow {
120
    image: url(:/images/up_arrow.png);
121
    width: 7px;
122
    height: 7px;
123
}
124

  
125
*::up-arrow:disabled, *::up-arrow:off {
126
   image: url(:/images/up_arrow_disabled.png);
127
}
128

  
129
/* Customize push buttons and comboboxes. Our read-only combobox
130
   is very similar to a push button, so they share the same border image. */
131

  
132
QPushButton {
133
    min-width: 4em;
134
}
135

  
136
QPushButton, QComboBox[editable="false"],
137
QComboBox[editable="true"]::drop-down {
138
    border-image: url(:/images/pushbutton.png) 5;
139
    border-width: 5;
140
}
141

  
142
QPushButton:hover, QComboBox[editable="false"]:hover,
143
QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover {
144
    border-image: url(:/images/pushbutton_hover.png) 5;
145
    border-width: 5;
146
}
147

  
148
QPushButton:pressed, QComboBox[editable="false"]:on,
149
QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on {
150
    border-image: url(:/images/pushbutton_pressed.png) 5;
151
    border-width: 5;
152
}
153

  
154
QMenuBar::item::selected {
155
    background-color: black;
156
    color: white;
157
}
158

  
159
QMenu::item::selected {
160
    background-color: black;
161
    color: white;
162
}
163

  
164
/* Customize read-only comboboxes. */
165

  
166
QComboBox[editable="false"] {
167
    padding-left: 3px;
168
    padding-right: 20px; /* space for the arrow */
169
}
170

  
171
QComboBox[editable="false"]::drop-down {
172
    subcontrol-origin: padding;
173
    subcontrol-position: top right;
174
    width: 15px;
175
    border-left-style: solid;
176
    border-left-color: darkgray;
177
    border-left-width: 1px;
178
}
179

  
180
QComboBox[editable="false"]::down-arrow {
181
    subcontrol-origin: content;
182
    subcontrol-position: center;
183
    position: relative;
184
    left: 1px; /* 1 pixel dropdown border */
185
}
186

  
187
/* The combobox arrow is on when the popup is open. */
188
QComboBox[editable="false"]::down-arrow:on {
189
    position: relative;
190
    top: 1px;
191
    left: 2px;
192
}
193

  
194
/* Customize editable comboboxes. */
195

  
196
QComboBox[editable="true"] {
197
    padding-right: 16px;
198
}
199

  
200
QComboBox[editable="true"]::drop-down {
201
    subcontrol-origin: border;
202
    subcontrol-position: top right;
203
    width: 13px;
204
    position: absolute;
205
    top: 2px;
206
    bottom: 2px;
207
    right: 2px;
208
}
209

  
210
QComboBox[editable="true"]::drop-down,
211
QComboBox[editable="true"]::drop-down:hover,
212
QComboBox[editable="true"]::drop-down:on {
213
    border-width: 0px;  
214
    border-left-width: 3px; /* we need only left and center part */
215
}
216

  
217
/* Shift the arrow when it's open. */
218
QComboBox[editable="true"]::down-arrow:on {
219
    position: relative;
220
    top: 1px;
221
    left: 1px;
222
}
223

  
224
/* Customize check boxes. */
225
QCheckBox {
226
    spacing: 5px;
227
}
228

  
229
QCheckBox::indicator {
230
    width: 13px;
231
    height: 13px;
232
}
233

  
234
QCheckBox::indicator:unchecked {
235
    image: url(:/images/checkbox_unchecked.png);
236
}
237

  
238
QCheckBox::indicator:unchecked:hover {
239
    image: url(:/images/checkbox_unchecked_hover.png);
240
}
241

  
242
QCheckBox::indicator:unchecked:pressed {
243
    image: url(:/images/checkbox_unchecked_pressed.png);
244
}
245

  
246
QCheckBox::indicator:checked {
247
    image: url(:/images/checkbox_checked.png);
248
}
249

  
250
QCheckBox::indicator:checked:hover {
251
    image: url(:/images/checkbox_checked_hover.png);
252
}
253

  
254
QCheckBox::indicator:checked:pressed {
255
    image: url(:/images/checkbox_checked_pressed.png);
256
}
257

  
258
/* Customize the size grip. */
259
QSizeGrip {
260
    image: url(:/images/sizegrip.png);
261
    width: 16px;
262
    height: 16px;
263
}
264

  
265
/* Customize the menu bar. */
266
QMenuBar {
267
    border-image: none;
268
    border-style: none;
269
    border-width: 1px;
270
    border-bottom-style: solid;
271
    border-bottom-color: darkslategray;
272
    padding: 2px;
273
}
274

  
275
/* Customize spin boxes. */
276

  
277
QSpinBox { 
278
    padding-right: 15px;
279
}
280

  
281
QSpinBox::up-button {
282
    subcontrol-origin: border;
283
    subcontrol-position: top right;
284

  
285
    width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
286
    border-image: url(:/images/spinup.png) 1;
287
    border-width: 1px;
288
}
289

  
290
QSpinBox::up-button:hover {
291
    border-image: url(:/images/spinup_hover.png) 1;
292
}
293

  
294
QSpinBox::up-button:pressed {
295
    border-image: url(:/images/spinup_pressed.png) 1;
296
}
297

  
298
QSpinBox::down-button {
299
    subcontrol-origin: border;
300
    subcontrol-position: bottom right;
301

  
302
    width: 16px;
303
    border-image: url(:/images/spindown.png) 1;
304
    border-width: 1px;
305
    border-top-width: 0;
306
}
307

  
308
QSpinBox::down-button:hover {
309
    border-image: url(:/images/spindown_hover.png) 1;
310
}
311

  
312
QSpinBox::down-button:pressed {
313
    border-image: url(:/images/spindown_pressed.png) 1;
314
}

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)