Tab Theming for XnView 1.81
Moderators: helmut, XnTriq, xnview
Tab Theming for XnView 1.81
XnView should support themes for Tabs like the toolbar, these themes would be XML, INI or some other small files that XnView can use. Here are examples:
My Personal theme
Tab bar background color = default
Selected Tab:
Background Colour = Light Yellow or Creme
Text Colour = Black
Unselected Tabs:
Background Colour = White
Text Colour = Black
The Matrix theme
Tab bar background color = Dark Grey
Selected Tab:
Background Colour = Light Green
Text Colour = Black
Unselected Tabs:
Background Colour = Black
Text Colour = Light Green
My Personal theme
Tab bar background color = default
Selected Tab:
Background Colour = Light Yellow or Creme
Text Colour = Black
Unselected Tabs:
Background Colour = White
Text Colour = Black
The Matrix theme
Tab bar background color = Dark Grey
Selected Tab:
Background Colour = Light Green
Text Colour = Black
Unselected Tabs:
Background Colour = Black
Text Colour = Light Green
Last edited by ckit on Tue Aug 02, 2005 2:44 am, edited 1 time in total.
I like---

- I like your idea, and support it.
- But this could be defined for each skin in its <info.txt> file as a section like [Tabs_Theme] I guess.
- Besides, I fear that colours defined by names only be not sufficient for the program; I think they might be defined as code, i.e. :
SelectedTabBackgroundColour = $90EE90
for LightGreen as: BGR with the damn "little endian" system…

Claude
Clo
Old user ON SELECTIVE STRIKE till further notice •
Simpler…

- Indeed, but it doesn't work directly to define a colour in an INI file (or any similar setting file) under Windows. You can use too the Windows system in decimal, but it's more complicated, while the hexa $BGR needs only to exchange Red >><< Blue from the RGB HTML colour-code...

Claude
Clo
Old user ON SELECTIVE STRIKE till further notice •
Before diving into colour formats and other details, I'd like to understand why we should have colours for the tabs but not for the rest of XnView. I have the feeling that you (ckit) use a special Windows colour scheme, but the tabs of XnView do not use that one - right?
Last edited by helmut on Tue Aug 02, 2005 7:31 pm, edited 1 time in total.
Read more carefully, plz
¤ Hi !
<ckit> wrote :
- Moreover, the way in which colours must be defined into an appropriate setting file isn't premature, it's primordial to plan such a feature…
G
Claude
Clo
<ckit> wrote :
- The point is not the Windows current theme, but the actually used tool-bar, in order to get colours for the tabs matching with this tool-bar theme……XnView should support themes for Tabs like the toolbar…
- Moreover, the way in which colours must be defined into an appropriate setting file isn't premature, it's primordial to plan such a feature…

Claude
Clo
Last edited by Clo on Wed Dec 17, 2008 5:04 pm, edited 1 time in total.
Old user ON SELECTIVE STRIKE till further notice •
The only problem is that Pierre used ownerdraw control (maybe derived
from tabs or from button, doesent matter) which is hardcoded for showing
it as it goes. Of course it can't support XP (and ever simple) themes.
The only reason to have such monster in XNView is to (you don't believe)... draw little icon in tab (which is absolutely uniformative for most of the images in this world). Because with API standart tabs you can't do this. But standart tabs can be 'skinned' by Windows naturally.
(A HATE 1.80 for this!!! A LOVE, LOVE, LOVE 1.74, but HATE 1.80.
Ufff... I'm boiling).
Folder tabs idea is cool. Really. But implementation is bad. My vision of
this problem:
1) Remove icon and make draw it with API.
2) Implement two ways to draw: API and Custom in depends of option
in settings (i.e. if No icon - use API). So you can get icons or right skin.
3) Use 'right way' to ownerdraw standart tabs as MS explains.
(Google for 'CustomDrawButtonDlg.cpp' and you understand).
Any other solutions are totally f..ed! INI or any other sol. is more, more stupid than ownerdraw hack itself.
IMHO! I can be wrong, and everything is more complicated, but if
I not, better to say it. Hope that XNview still stands clear and fancy.
PS. It will be good to have option 'turn off folder tabs completely'.
PPS. Sooooorry for my eng.
from tabs or from button, doesent matter) which is hardcoded for showing
it as it goes. Of course it can't support XP (and ever simple) themes.
The only reason to have such monster in XNView is to (you don't believe)... draw little icon in tab (which is absolutely uniformative for most of the images in this world). Because with API standart tabs you can't do this. But standart tabs can be 'skinned' by Windows naturally.
(A HATE 1.80 for this!!! A LOVE, LOVE, LOVE 1.74, but HATE 1.80.
Ufff... I'm boiling).
Folder tabs idea is cool. Really. But implementation is bad. My vision of
this problem:
1) Remove icon and make draw it with API.
2) Implement two ways to draw: API and Custom in depends of option
in settings (i.e. if No icon - use API). So you can get icons or right skin.
3) Use 'right way' to ownerdraw standart tabs as MS explains.
(Google for 'CustomDrawButtonDlg.cpp' and you understand).
Any other solutions are totally f..ed! INI or any other sol. is more, more stupid than ownerdraw hack itself.
IMHO! I can be wrong, and everything is more complicated, but if
I not, better to say it. Hope that XNview still stands clear and fancy.
PS. It will be good to have option 'turn off folder tabs completely'.
PPS. Sooooorry for my eng.
But you can disable icon in tabAnonymous wrote:The only problem is that Pierre used ownerdraw control (maybe derived
from tabs or from button, doesent matter) which is hardcoded for showing
it as it goes. Of course it can't support XP (and ever simple) themes.
The only reason to have such monster in XNView is to (you don't believe)... draw little icon in tab (which is absolutely uniformative for most of the images in this world). Because with API standart tabs you can't do this. But standart tabs can be 'skinned' by Windows naturally.
(A HATE 1.80 for this!!! A LOVE, LOVE, LOVE 1.74, but HATE 1.80.
Ufff... I'm boiling).
Folder tabs idea is cool. Really. But implementation is bad. My vision of
this problem:
1) Remove icon and make draw it with API.
Yes, currently don't use standard theme2) Implement two ways to draw: API and Custom in depends of option
in settings (i.e. if No icon - use API). So you can get icons or right skin.
'right way'??? There is many problem to use theme with tab...3) Use 'right way' to ownerdraw standart tabs as MS explains.
(Google for 'CustomDrawButtonDlg.cpp' and you understand).
You can disable it tooPS. It will be good to have option 'turn off folder tabs completely'.
PPS. Sooooorry for my eng.

Pierre.
Not really…

- Not really… You can only disable / enable the tab display when there is a single tab.…You can disable it toooption/tab
- To disable the tabs totally, we have the Menu entry Folder tabs in the "View" menu, but no option…
(Aside : why "Folder" ? The tabs open files, not folders.)

Claude
Clo
Old user ON SELECTIVE STRIKE till further notice •
Indeed, I can (with some limitations, as alredy said in post before) in either way, but main idea is not to remove icon. Let it be (C). Main idea is to support native windows skinning (and/or classic inteface, as I use w2k).But you can disable icon in tab1) Remove icon and make draw it with API.
All right. I assume that I have not dig deep enough to say - thats easy,'right way'??? There is many problem to use theme with tab...3) Use 'right way' to ownerdraw standart tabs as MS explains.
(Google for 'CustomDrawButtonDlg.cpp' and you understand).
but I believe that there is can be some 'natural' way to implement
such 'ownerdraw' like in MS example with button. As I aready said
simply removing icon will be simpliest way to do this, but if you and
others think that it is very important, and you want to leave icon, this
is unacceptable. I will see deeper how it can be worked out and
share my investigations here.