Page 1 of 1

Tab Theming for XnView 1.81

Posted: Mon Aug 01, 2005 2:45 am
by ckit
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

I like---

Posted: Mon Aug 01, 2005 3:26 pm
by Clo
:) Hello Chris !

- 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…

:mrgreen: Kind regards,
Claude
Clo

Posted: Tue Aug 02, 2005 2:23 am
by ckit
The HTML colour coding system is more logical.

Simpler…

Posted: Tue Aug 02, 2005 4:32 pm
by Clo
:) Hello Chris !
- 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...
:mrgreen: Kind regards,
Claude
Clo

Posted: Tue Aug 02, 2005 6:42 pm
by helmut
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?

Read more carefully, plz

Posted: Tue Aug 02, 2005 7:11 pm
by Clo
¤ Hi !
<ckit> wrote :
…XnView should support themes for Tabs like the toolbar
- 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…

- 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…

:mrgreen: G
Claude
Clo

Posted: Mon Sep 19, 2005 11:35 am
by Guest
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.

Posted: Mon Sep 19, 2005 1:26 pm
by xnview
Anonymous 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.
But you can disable icon in tab
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.
Yes, currently don't use standard theme
3) Use 'right way' to ownerdraw standart tabs as MS explains.
(Google for 'CustomDrawButtonDlg.cpp' and you understand).
'right way'??? There is many problem to use theme with tab...
PS. It will be good to have option 'turn off folder tabs completely'.
PPS. Sooooorry for my eng.
You can disable it too :-) option/tab

Not really…

Posted: Mon Sep 19, 2005 4:40 pm
by Clo
:) Hello Pierre !
…You can disable it too :) option/tab
- Not really… You can only disable / enable the tab display when there is a single 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.)

:mrgreen: Kind regards,
Claude
Clo

Posted: Mon Sep 19, 2005 4:57 pm
by Guest
1) Remove icon and make draw it with API.
But you can disable icon in tab
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).
3) Use 'right way' to ownerdraw standart tabs as MS explains.
(Google for 'CustomDrawButtonDlg.cpp' and you understand).
'right way'??? There is many problem to use theme with tab...
All right. I assume that I have not dig deep enough to say - thats easy,
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.

Posted: Tue Sep 20, 2005 6:12 am
by Guest

Posted: Tue Sep 20, 2005 10:44 am
by Guest
Is it helpful, Pierre?

Posted: Wed Sep 21, 2005 8:59 am
by xnview
Anonymous wrote:Is it helpful, Pierre?
Perhaps, i must test...

Posted: Tue Oct 04, 2005 3:20 pm
by Guest
Any progress, Pierre? Need any other solution?
(Don't want you to think that I'm pushing you. I just want to help you to make XNV better).