I love that TreeView control
Moderators: XnTriq, helmut, xnview
-
- Posts: 39
- Joined: Tue Jul 22, 2008 4:49 pm
I love that TreeView control
Very meticulously crafted control. They don’t write software like this anymore. Congratulations!
Only one suggestion: I’m using mid-tone background, so the dotted lines become invisible, should be black or inverse.
Only one suggestion: I’m using mid-tone background, so the dotted lines become invisible, should be black or inverse.
- Attachments
-
- Screenshot-xnview.png (60.18 KiB) Viewed 2765 times
Re: I love that TreeView control
- Qt Style Sheets Examples: Customizing QTreeView
Code: Select all
QTreeView::branch:has-siblings:!adjoins-item {
border-image: url("UI:branch_vline.gif") 0;
}
QTreeView::branch:has-siblings:adjoins-item {
border-image: url("UI:branch_more.gif") 0;
}
QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
border-image: none;
image: url("UI:branch_closed.gif");
}
QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
border-image: none;
image: url("UI:branch_open.gif");
}
QTreeView::branch:!has-children:!has-siblings:adjoins-item {
border-image: url("UI:branch_end.gif") 0;
}
Foreground color: █ #603024 = R96/G48/B36
Background color: █ #9fcfdb = R159/G207/B219
- Attachments
-
- branch_end.gif (64 Bytes) Viewed 2758 times
-
- branch_more.gif (67 Bytes) Viewed 2758 times
-
- branch_vline.gif (64 Bytes) Viewed 2758 times
-
- branch_open.gif (78 Bytes) Viewed 2758 times
-
- branch_closed.gif (78 Bytes) Viewed 2758 times
Re: I love that TreeView control
On second thought: Just adding this “code”…
… to style_sheet.qss will also do the trick (without the need for any extra images)
Code: Select all
QTreeView::item {
color: rgb(0, 0, 0);
}
QTreeView::item:hover,
QTreeView::item:selected:active,
QTreeView::item:selected:!active {
color: rgb(255, 255, 255);
}
-
- Posts: 39
- Joined: Tue Jul 22, 2008 4:49 pm
Re: I love that TreeView control
Thank you, There is style_sheet.qss & style_sheet_linux.qss, the first one has the the following, the 2nd is empty file.
Are these values hardcoded at design time OR dynamically modified by the app at runtime?
Are these values hardcoded at design time OR dynamically modified by the app at runtime?
Code: Select all
QTreeView::item{
color: rgb(220,220,220);
border: 0px solid green;
}
QTreeView::item:alternate{
}
QTreeView::item:selected:!active{
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(80, 80, 80), stop:1 rgb(70, 70, 70));
}
QTreeView::item:selected:active{
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(80, 80, 80), stop:1 rgb(60, 60, 60));
}
QTreeView::item:hover{
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(80, 80, 80), stop:1 rgb(60, 60, 60));
}
Re: I love that TreeView control
Hi Rebellious
I'm a Windows user, but I assume that things are handled not too differently on Linux:Rebellious wrote:Are these values hardcoded at design time OR dynamically modified by the app at runtime?
- %ProgramFiles%\XnViewMP\UI\ = installation (static)
- style_sheet.qss
- style_sheet_linux.qss
- style_sheet_mac.qss
- style_sheet_win.qss
- %AppData%\XnViewMP\ = configuration (dynamic / per user)
- style_sheet.qss
- style_sheet_win.qss or
style_sheet_linux.qss
- View » Theme » Dark theme
-
- Posts: 39
- Joined: Tue Jul 22, 2008 4:49 pm
Re: I love that TreeView control
Thank you. It didn’t work. I got some very ugly colors all over the app not just the treeview. I had to delete style_sheet.qss in the user dir to get back to default colors. You need some code to set treeview dotted lines color to inverse of background color.
Re: I love that TreeView control
Could you post a screenshot?Rebellious wrote:I got some very ugly colors all over the app not just the treeview.
What distro (Arch Linux, openSUSE, …) are you on?
Do you use the Cleanlooks theme?
Is the treeview's background turquoise by default on your system?
OK, I'm afraid this a wee bit too complicated for a Linux illiterate
- ArchWiki: Uniform Look for Qt and GTK Applications » Styles for both Qt and GTK+
- David Vignoni: Icons for QT Designer in Oxygen style
-
- Posts: 39
- Joined: Tue Jul 22, 2008 4:49 pm
Re: I love that TreeView control
Sorry for my delayed response...
Could you post a screenshot?
As I mentioned above I deleted style_sheet and went back to default, so ugly colors are no longer there but it should be easy to reproduce.
What distro (Arch Linux, openSUSE, …) are you on?
Linux Mint MATE versions 13 & 14
Do you use the Cleanlooks theme?
YEs.
Is the treeview's background turquoise by default on your system?
No, it's part of my selections for system-wide fonts & colors, and xnview ignores these in some cases.
Could you post a screenshot?
As I mentioned above I deleted style_sheet and went back to default, so ugly colors are no longer there but it should be easy to reproduce.
What distro (Arch Linux, openSUSE, …) are you on?
Linux Mint MATE versions 13 & 14
Do you use the Cleanlooks theme?
YEs.
Is the treeview's background turquoise by default on your system?
No, it's part of my selections for system-wide fonts & colors, and xnview ignores these in some cases.
- Schattenreiter
- Posts: 43
- Joined: Mon Sep 19, 2005 5:46 pm
- Location: Berlin, Germany
- Contact:
Re: I love that TreeView control
looking superb
HackIntosh
Mountain Lion 10.8.2 • G530 • GA-Z77M-D3H • Sapphire 5770 • Soundblaster Audigy Platinum • 16GB-1333-DDR3 • Atheros AR9280
Mountain Lion 10.8.2 • G530 • GA-Z77M-D3H • Sapphire 5770 • Soundblaster Audigy Platinum • 16GB-1333-DDR3 • Atheros AR9280