Skip to content

Commit 2efd85a

Browse files
committed
QScrollBar Arrow Enhancement
1 parent 14d9903 commit 2efd85a

File tree

4 files changed

+60
-20
lines changed

4 files changed

+60
-20
lines changed

src/qt/dash.qrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
<file alias="drkblue_downArrow">res/images/drkblue_downArrow.png</file>
5656
<file alias="drkblue_downArrow_small">res/images/drkblue_downArrow_small.png</file>
5757
<file alias="drkblue_upArrow_small">res/images/drkblue_upArrow_small.png</file>
58+
<file alias="drkblue_leftArrow_small">res/images/drkblue_leftArrow_small.png</file>
59+
<file alias="drkblue_rightArrow_small">res/images/drkblue_rightArrow_small.png</file>
5860
<file alias="drkblue_qtreeview_selected">res/images/drkblue_qtreeview_selected.png</file>
5961
<file alias="drkblue_walletFrame_bg">res/images/drkblue_walletFrame_bg.png</file>
6062
<file alias="drkblue_walletFrame">res/images/drkblue_walletFrame.png</file>

src/qt/res/css/drkblue.css

Lines changed: 58 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -273,23 +273,21 @@ color:#333;
273273
}
274274

275275
QScrollBar { /* Scroll Bar */
276-
background-color:#ffffff;
276+
277277
}
278278

279279
QScrollBar:vertical { /* Vertical Scroll Bar Attributes */
280-
border:1px solid #818181;
281-
border-left:0px;
282-
background:#333;
283-
width:17px;
284-
margin: 0px 0px 0px 0px;
280+
border:0;
281+
background:#ffffff;
282+
width:18px;
283+
margin: 18px 0px 18px 0px;
285284
}
286285

287286
QScrollBar:horizontal { /* Horizontal Scroll Bar Attributes */
288-
border:1px solid #818181;
289-
border-top:0px;
290-
background:#333;
291-
height:17px;
292-
margin: 0px 0px 0px 0px;
287+
border:0;
288+
background:#ffffff;
289+
height:18px;
290+
margin: 0px 18px 0px 18px;
293291
}
294292

295293

@@ -303,23 +301,63 @@ background:#e0e0e0;
303301
min-width:10px;
304302
}
305303

306-
307304
QScrollBar::add-page, QScrollBar::sub-page { /* Scroll Bar Background */
308305
background:#F8F6F6;
309306
}
310307

311-
QScrollBar:up-arrow, QScrollBar:down-arrow { /* Up and Down Arrows */
312-
border:2px solid #333;
313-
width:3px;
314-
height:3px;
315-
background:#fff;
308+
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { /* Define Arrow Button Dimensions */
309+
background-color:#F8F6F6;
310+
border: 1px solid #f2f0f0;
311+
width:16px;
312+
height:16px;
313+
}
314+
315+
QScrollBar::add-line:vertical:pressed, QScrollBar::sub-line:vertical:pressed, QScrollBar::add-line:horizontal:pressed, QScrollBar::sub-line:horizontal:pressed {
316+
background-color:#e0e0e0;
317+
}
318+
319+
QScrollBar::sub-line:vertical { /* Vertical - top button position */
320+
subcontrol-position:top;
321+
subcontrol-origin: margin;
322+
}
323+
324+
QScrollBar::add-line:vertical { /* Vertical - bottom button position */
325+
subcontrol-position:bottom;
326+
subcontrol-origin: margin;
316327
}
317328

318-
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical, QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { /* Remove Up, Down, Left, Right Arrows from UI */
319-
width:0px;
320-
height:0px;
329+
QScrollBar::sub-line:horizontal { /* Vertical - left button position */
330+
subcontrol-position:left;
331+
subcontrol-origin: margin;
321332
}
322333

334+
QScrollBar::add-line:horizontal { /* Vertical - right button position */
335+
subcontrol-position:right;
336+
subcontrol-origin: margin;
337+
}
338+
339+
QScrollBar:up-arrow, QScrollBar:down-arrow, QScrollBar:left-arrow, QScrollBar:right-arrow { /* Arrows Icon */
340+
width:10px;
341+
height:10px;
342+
}
343+
344+
QScrollBar:up-arrow {
345+
background-image: url(':/images/drkblue_upArrow_small');
346+
}
347+
348+
QScrollBar:down-arrow {
349+
background-image: url(':/images/drkblue_downArrow_small');
350+
}
351+
352+
QScrollBar:left-arrow {
353+
background-image: url(':/images/drkblue_leftArrow_small');
354+
}
355+
356+
QScrollBar:right-arrow {
357+
background-image: url(':/images/drkblue_rightArrow_small');
358+
}
359+
360+
323361
/*******************************************************/
324362

325363
/* DIALOG BOXES */
15.4 KB
Loading
15.4 KB
Loading

0 commit comments

Comments
 (0)