News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Problems with dark Theme

Started by Leartin, May 01, 2014, 11:58:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Leartin

So I tried to do a dark theme and for the most part, it works. But some things don't, and I'd just like to list my problems.

1) Some text stays black on my black background, even though I changed colors. For example, the info-window you get when clicking anywhere on the map ("this is a building"), entries in lists, text you write yourself,...
2) Colored buttons seem problematic. There are several things:
2.1) In the Finance Window, Colored Buttons don't change size
2.2) In the Minimap, Colored Buttons don't use gui_button_color_text, but switch from black to white when active/inactive.
2.3) The use of Colored Buttons as Player Color Chooser and in the playerlist disables designs which use a lot of space, as the button always has to fit those rather small boxes. Also, if the Button outsides are bigger then the box, the color mask is applied multiple times. - the minimal button size should be decided by the sum of the outer parts of the button.
2.4) The Player Color Chooser uses an X to indicate which colors are already taken by other players, although there is a disabled colored button available.
2.5) I think the way the color mask works is that the color values are added together and then halfed. This means you never get the goal-color (it's always half desaturated) and the button has less contrast then the uncolored version. Is a HSL-like blending method possible? As in: Read the Lightness from the Button image, read the Saturation from the Color Mask, Hue defines color. I know this needs a lot more processing power, but still next to nothing and is only done once.
3) You cannot define padding for buttons. Assymetrical buttons are not possible, and any button design that uses some pixels for decoration looks stupid with overlapping text. This is also true for editfields, the numbers inside will touch the border if it's 2 pixels instead of only 1
4) I suppose it's currently not possible to get rid of orange as titlebarcolor for non-player-specific windows?

An_dz

The Theme system is quite broken, version 120.0 won't have it complete. It's being released because it has been quite a long time since the last release and now it's too work to remove it before release. But at least everything else works, or should.

1, 2.1, 2.2:
These dialogs are not changed, they are using the same code before the theming system, or were not fully finished. I've been creating patches from time to time with dialogs ready for the new system.

2.3:
Checkbutton, Posbutton and Scrollbar should be resizeable as the standard buttons are. I think Max-Max code could do this.

3:
I have created a patch that should fix this. But maybe it should be x1,x2,y. (left padding, right padding, top padding)

4:
No

Leartin

Thanks. I guess that means currently, a dark theme just isn't possible. I attach the sources for some future themebuilders :D

prissi

The colors in finance window etc. are defined but the program. i.e. these need buttons that can be colored (not too dark). There were (at one time) white text in dark purple buttons. I do not see how to make this configurable without adding colors for each button.

Orange is a player color, but this player is inaccessible. Also defining this with another color has the danger of confusion, although this would be very simple.

Scrollbars are resizeable already. Making checkboxes resizeable is easy, but then the cross could become quite small.

Color buttons are draw using blending, i.e. the brightness comes form the button the color from what was asked i.e. color buttons need to be grayscale only. This system is done every time a buttons is drawn on the screen.

Since most of the work on themes was wasted on how to draw a stretchable button, not so much actual work was put into testing the themability. Your input is very useful to see which dialogues need fixing most urgently. Also a lot more bug will apprear when I finally get the freetype support working, i.e. font in all sizes. (Needed for the 4k screen coming up ... )

List are tricky, since the color of list entries is defined by the program (i.e. obsolete color in line list). Aparently those need either skinning or a clever system to invert the color (from dark blue to bright blue) when the background is too dark.

Leartin

Quote from: prissi on May 01, 2014, 09:56:19 PM
The colors in finance window etc. are defined but the program. i.e. these need buttons that can be colored (not too dark). [...]
Well, no. I thought that as well and made black buttons with gray border, in the hope that black would stay black anyway, while gray becomes the color in question. However, even the black parts of the buttons were drawn with color, only a bit darker.
You should be able to see this in the theme for pak192.comic I made. The colored buttons and the normal buttons are the same, but while the normal buttons have a black outline and an almost white gloss, the colored buttons seem dull. It's actually hard to see wether they are clicked or not. This is similar in an_dz theme for pak96.comic.

Quote from: prissi on May 01, 2014, 09:56:19 PM
List are tricky, since the color of list entries is defined by the program (i.e. obsolete color in line list). Aparently those need either skinning or a clever system to invert the color (from dark blue to bright blue) when the background is too dark.
I'd prefer skinning. While dark blue - light blue is possible, I think it would prove rather hard to enable "dark yellow". I think it would be preferable to pick any color, even if it's just another shade of red/yellow/blue most of the time. As for the black text, additionally to it's very own parameter, I think it should default to the static text color.

Quote from: prissi on May 01, 2014, 09:56:19 PMOrange is a player color, but this player is inaccessible. Also defining this with another color has the danger of confusion, although this would be very simple.
Confusing in which way? With a new theme messing around all other colors, I don't think it would surprise anyone. I think 8-15 or 208-215 would do really good as "neutral colors", some themes might prefer other colors (like 16-23 for pak96.comic or 88-95 for pak192.comic)
Or maybe even define the title bar the same way buttons are defined? Now that would be awesome ;)


How hard would it be to draw outlines? Mostly for text, eg. the color-changing text on the colored minimap buttons can never be a problem if the black text always had a white outline and vice versa. A 'real outline' would also get rid of two big boxes around activated buttons or checkboxes. Or, later down the road, an outline around the vehicles at the depot (it's quite hard to see them on a dark background, a white/light grey outline might help a lot)

prissi

The meaning of colors in the list is in various documentation. including the help files. I would rather not change them.

About outline: There is a function (you can use it for station names), but in east asian languages such outlines are often not very good at rendering readable characters on dark brackgrounds. But it is certainly a way one can try.

Yona-TYT


I have noticed that the buttons do not align properly in some cases.


prissi

LIst are at the moment are drwn following linespaces. The list system is also stuck halfway through an overhaul.

An_dz

Almost everything in the dialogues are broken, nobody touched them before the theme system was done and now they need to be updated for the theme system. I have just added the new colours.

Yona-TYT


I've been playing around with the new colors
But there is a text that I can not change it I'm afraid. :o

prissi

Telling us which would help to fix this for us.

Yona-TYT


gui_color_text = #c98926
gui_color_text_highlight = #96cc95
gui_color_text_title = #96cc95
gui_color_button_text = #36b7ff
gui_color_button_text_selected = #6c45f3
gui_color_button_text_disabled = #8dc07e
gui_color_colored_button_text_selected = #a59864
gui_color_colored_button_text = #25cf6f
gui_color_checkbox_text = #36b7ff
tooltip_text_color = #ffffff
gui_color_statusbar_background = #0000c6
gui_color_ticker_background = #0000c6
gui_color_chart_background = #0000c6gui_color_statusbar_text = #8dc0f4

prissi

Much more dialogues and labels/text should now obey the correct color (in r7336)

Thank you for your efforts, hightly appreciated. Please report also other missed entries.

Yona-TYT


Thanks so much ..! ;)
Others more here..



prissi

The colorbutton you can cure yourself by making a color button which has a white square in the left corner. The other ones are still pending though.

Yona-TYT


This is weird, select a button causes the others change the text color.



Yona-TYT


Another thing I've noticed.
Part of the top bar disappears.



prissi

I am not sure about the titlebar, because there everything looks right. Maybe I need you theme for debugging.

The other places are hopefully fixed in r7338

Yona-TYT

Add these parameters to see the problem.
# sizes
gui_titlebar_height = 25
gui_hspace=8
gui_vspace=8
gui_button_height=16




prissi

Works fine for me ... maybe some other button height or so is involved too?

Yona-TYT

Quote from: prissi on October 13, 2014, 01:08:35 PM
Works fine for me ... maybe some other button height or so is involved too?
I'll try to see in windows.




The filters of networks also have problems.

Yona-TYT


Indeed,I havethe same problem inWindows.


Yona-TYT


prissi

Nothing busy with real life and moving the nightly builds to a new home.

Yona-TYT


Quote from: prissi on November 10, 2014, 10:26:47 PM
Nothing busy with real life and moving the nightly builds to a new home.
Quiet, no rush.  ;)

prissi

Ok, the titlebarproblem is fixed. However, there are still lots of issues with dialogues using larger than expected buttons.

Yona-TYT


Quote from: prissi on November 28, 2014, 12:06:43 AM
Ok, the titlebarproblem is fixed. However, there are still lots of issues with dialogues using larger than expected buttons.
:thumbsup:


Quote from: Yona-TYT on October 14, 2014, 12:27:46 AM

The filters of networks also have problems.


That there with the color of text in the filters?

prissi

THis is with all lists essentially.

An_dz

Network filters colours fixed in r7394.

Yona-TYT