The International Simutrans Forum

 

Author Topic: Add theme parameters to make dark themes look better  (Read 416 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1467
  • Languages: ja
Add theme parameters to make dark themes look better
« on: February 28, 2021, 12:55:51 PM »
Ranran, who got lost in Cyber-space, obtained two types of cyber themes.
However, there are still some challenges to applying it in simutrans.






(1) The title bar is not beautiful
Currently the brightness of characters and background is automatically adjusted by gui_player_color_dark and gui_player_color_bright, but this is not enough. Especially on dark colored themes.
Because this is intended to invert the brightness. But with a dark theme it is not always correct.



I think the parameters related to the title bar and normal text brightness should be separated.
Ideally, we should have a color mask like for color buttons.


(2) Borders where theme can't specify a color will spoil the look
For example, components such as progress bars, color boxes, and views have a two-color gray border.
I want you to be able to specify the color of these borders as well.


(3) Menu bar...
The Menubar design depends on pakset and is separated from the theme. So it creates a contradiction with the theme design and creates a weird look. This fact shatters the minds of theme designers. (´・ω・`)
My suggestion is to separate the button background from the button icon.


The theme designs the foundation and pakset designs the objects.
I don't think the transition to this specification will cause any problems. Because all existing icons have the whole image.
Not only does this remove the contradiction, but it also improves the look somewhat by not stretching the background with large buttons.


(4) halttype symbols
This also improves the appearance if you can design with the theme.
I know that the 192 comic has a sleekly designed halttype symbol, but pakset is just doing what the theme should support. For example, if you change to a high contrast theme, those symbols will create a design contradiction.



The following is a greedy request.
(5) Can you set the color of the white frame that appears when you press the button, or make it a different style?


Does not match the shape of the button (´・ω・`)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10549
  • Languages: De,EN,JP
Re: Add theme parameters to make dark themes look better
« Reply #1 on: February 28, 2021, 01:11:24 PM »
I am not sure that I would use a dark theme, but more flexibility is certainly a good idea. However, I fear it would be up to you to make a patch. Some things are probably easy, while other may be very hard. So I would suggest a number of patcher obe by one.

I have serious doubts if the new transparent icon would be adapted fast. Alternatively one may thin of the cursor for many objects like ways.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1594
    • Simutrans-BLOG
  • Languages: ES
Re: Add theme parameters to make dark themes look better
« Reply #2 on: February 28, 2021, 07:36:46 PM »
Their themes are great!


"Currently the brightness of characters and background is automatically adjusted by gui_player_color_dark and gui_player_color_bright, but this is not enough. Especially on dark colored themes.
Because this is intended to invert the brightness. But with a dark theme it is not always correct. "
A mask like the one with the colored buttons should be the way to go, it doesn't seem like something that difficult to code.

"The Menubar design depends on pakset and is separated from the theme. So it creates a contradiction with the theme design and creates a weird look. This fact shatters the minds of theme designers. (´ ・ ω ・ `)
My suggestion is to separate the button background from the button icon. "

This seems like a good idea to me, the background in question is the same as the old theme, I suppose that the one offered by the theme file should be used.

"(5) Can you set the color of the white frame that appears when you press the button, or make it a different style?"

I was looking for something like this for the high contrast theme, but I didn't get anything in the code, a hint would be nice, so I can add a new parameter.


I really love this, how I wish I had time to work on this.

Offline Ranran

  • Devotee
  • *
  • Posts: 1467
  • Languages: ja
Re: Add theme parameters to make dark themes look better
« Reply #3 on: March 01, 2021, 04:25:06 PM »
more flexibility is certainly a good idea. However, I fear it would be up to you to make a patch. Some things are probably easy, while other may be very hard. So I would suggest a number of patcher obe by one.
Okay. Submit the first patch for (1). Separates the brightness of the player color title bar from existing parameter (gui_player_color_dark).
I'm not good at naming variable names in English. It's so long that you can change it if necessary.
And I don't know if it is correct to be included in the saved version, (122,1).

I edited the high contrast theme. You can confirm that the player color title bar is darker than the existing version. In addition, there is no change in other themes.
That is the effect of this patch.


EDIT:
I submit an additional patch for (2).
It allows to change some border colors with the theme.
The default is MN_GREY0 for top left and MN_GREY4 for bottom right. In that case, the display will be the same as before.


About (5), it is easy to make the color changeable. But I wonder if that is the best solution.

EDIT2:
There was an error in titlebar_bg_brightness.patch so I uploaded a modified version
« Last Edit: March 03, 2021, 02:59:59 PM by Ranran »

Offline Leartin

  • Oh no, not him again!
  • Devotee
  • *
  • Posts: 1573
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Add theme parameters to make dark themes look better
« Reply #4 on: March 01, 2021, 08:18:29 PM »
(3) Menu bar...
The Menubar design depends on pakset and is separated from the theme. So it creates a contradiction with the theme design and creates a weird look. This fact shatters the minds of theme designers. (´・ω・`)
My suggestion is to separate the button background from the button icon.


The theme designs the foundation and pakset designs the objects.
I don't think the transition to this specification will cause any problems. Because all existing icons have the whole image.
Not only does this remove the contradiction, but it also improves the look somewhat by not stretching the background with large buttons.

Be aware that there already is something like that. Menu icons can be transparent with a "background image" defined for each seperate menu in the menuconfig - that's how pak192.comic does it's color indicators at the bottom (such that the same object can be in several menus, and pressing the icon does not darken the color strip). Hence there are already many icons with transparency, and I don't see why a theme should be able to overwrite the color indicators. (Unless the paksets could choose the color of the title bar instead, which makes the bottom strips obsolete - though I'm not sure that would make you any happier)

Otherwise, I feel that p192c gets off the hook due to black outlines, which mean that really, only a black background would hurt them. Most paksets are not that lucky. Pretty sure no theme designer would check on all icon colors, and no pakset designer would check all themes when creating icons, so something like the attached graphic will happen - and that's no good.

Your example themes have another issue - even if the icons would adapt to their background color, it still wouldn't "feel" right - they should mostly be monochrome lineart to fit the style. You typically see that when you download such themes for an OS - all the popular apps get updated automatically and look flashy, but anything else is off even with transparent background. What might help instead are additional borders around the icons. Just one or two pixels could be enough to inject the essence of the theme into the menu without changing the actual icons. In a similar vein, when a dark theme is used, perhaps all pakset graphics (eg the vehicles in the depot) should get an outer glow.

Similarly, for the title bar colors, I'd rather suggest a solution similar to color buttons. If the menu bar is composed of 9 elements just like buttons are, you could make it such that not the complete title bar is player colored, but rather has a color indicator bulb on the left edge, or a colored line seperating the title from the main window, or...