Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFGTOOL: Windows themes #5123

Merged
merged 19 commits into from
Jul 15, 2024
Merged

CFGTOOL: Windows themes #5123

merged 19 commits into from
Jul 15, 2024

Conversation

aybe
Copy link
Collaborator

@aybe aybe commented Jul 14, 2024

Additional information

Finally figured out CONTROL.INI nonsense, OLE colors in wrong order! 😫

For what's been upgraded, I simplified drawing code drastically by using fill rects...

I also added a visualizer for GUI::String... it took me ages to notice chars are 4 bytes... 💀🤣

image

Border is 1:1, menu almost done, the rest will be very long... (next time)

The original Windows 3.1 themes:

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

@aybe
Copy link
Collaborator Author

aybe commented Jul 14, 2024

Not sure on how to fix these linux/mac errors...

@Torinde
Copy link
Contributor

Torinde commented Jul 14, 2024

I enjoy all the recent CFGTOOL updates, thanks!

LCD Default seems closest to the DOSbox-X theme, but its borders are blue instead of gray:
image (from #5108)

Can you add one like that?
And one "modern dark", e.g. white letters on black/dark background.

What about a .conf setting to choose the theme + auto setting "match host OS theme"?

@aybe
Copy link
Collaborator Author

aybe commented Jul 14, 2024

The original was based on 16-color mode, had to switch to 24-bit as color panel swatches were so confusing; then I realized that indeed it's different. It shouldn't be too hard to add it back.

Dark mode is hard, although you can easily come up with one, I found it more looking like high-contrast, it's not easy to come up with the right balance of colors.

Last things are on the list but before that, the rest of the interface must be ported to that new scheme first.

@aybe aybe marked this pull request as draft July 14, 2024 22:49
@aybe aybe marked this pull request as ready for review July 14, 2024 23:01
@aybe
Copy link
Collaborator Author

aybe commented Jul 14, 2024

There you go, all it needs now is a "theme guru" to craft nice ones.

image

image

image

@aybe aybe merged commit c2d3428 into joncampbell123:master Jul 15, 2024
20 checks passed
@aybe aybe deleted the even-more branch July 15, 2024 00:02
@Torinde
Copy link
Contributor

Torinde commented Jul 15, 2024

Thanks, @aybe!

Tangentially related - is there a setting to change the DOSbox menu look - graphical (as on these screenshots) vs text-based?

@joncampbell123
Copy link
Owner

joncampbell123 commented Jul 15, 2024

Oooh, nice! You got the menu bar to look like Windows 3.1 too! 👍

That looks way closer to what Windows 3.1 actually looks like! So now every window looks like WS_DIALOG, which is perfectly fine.

@aybe
Copy link
Collaborator Author

aybe commented Jul 15, 2024

Thanks, @aybe!

Tangentially related - is there a setting to change the DOSbox menu look - graphical (as on these screenshots) vs text-based?

Obviously, LCD Dark looks terrible and one really needs a true dark skin... I suppose I'll try again at some point.

Just noticed a bug in the theme menu which gets overridden by section editor...

The banner you mean? [dosbox[ bannercolortheme

image

Oooh, nice! You got the menu bar to look like Windows 3.1 too! 👍

That looks way closer to what Windows 3.1 actually looks like! So now every window looks like WS_DIALOG, which is perfectly fine.

At the moment, borders, title bar, buttons, focus are 1:1, everything else has to be done.

Though nice, these old themes have a big problem, button color is always the same...

While fixing, I will DRY the code first like I did for the buttons, then adjust.

@joncampbell123
Copy link
Owner

One thing you should consider is that the menu bar in Windows 3.1 has a line below it to visually separate it from the client area of the window. Can that be done?

@aybe
Copy link
Collaborator Author

aybe commented Jul 15, 2024

Yes I know, I just wanted to get theme in first to see how well it would work with actual code.

@Torinde
Copy link
Contributor

Torinde commented Jul 16, 2024

The banner you mean?

No, I mean the menu of the DOSbox-X window itself:
Graphic:
image

Text:
image

Can those be chosen via .conf or dosbox-x.exe argument?

Also, after the recent changes - when closing Configuration tool window the main DOSbox window goes to the center of the screen. Builds from 1 month ago don't do that. Maybe related: #3612

And - DOSbox-X window in TTF mode now is a little bigger than in builds from 1 month ago, just enough so that the title bar is outside the screen (above the top) - I see Main/CPU/Video/etc., but not the _ [] X (laptop I'm trying that on is with high resolution internal screen with 200% scaling and lower resolution external one with no scaling and in such situation Windows OS acts in various undesirable ways... so probably TTF being too big is to blame on my setup. But difference between DOSbox-X builds is enough to make it extra annoying, e.g. to reach the title bar in the latest build I have to go through full screen... then I can see the top, but not the bottom of the window :))

@aybe
Copy link
Collaborator Author

aybe commented Jul 16, 2024

  1. comes from OS?
  2. haven't seen it for ages
  3. yes, it fixed some cases but broke others
  4. rough guess, comes from fixed/sizable Win32 behavior

@joncampbell123
Copy link
Owner

The choice of menu is a compile time option. The idea is to use what the OS provides, or if that is not possible, to draw it's own. It's not something that can be changed by a dosbox.conf option.

@aybe
Copy link
Collaborator Author

aybe commented Jul 17, 2024

It took me a while to figure out why menu height was -858,993,460... 💀

Windows 3.1 has no 3D window with a menu, I checked everywhere, you'll get stock thickness:

image

@joncampbell123
Copy link
Owner

It took me a while to figure out why menu height was -858,993,460... 💀

Windows 3.1 has no 3D window with a menu, I checked everywhere, you'll get stock thickness:

image

That's how I remember it too.

@aybe
Copy link
Collaborator Author

aybe commented Jul 18, 2024

Two things,

First, it is impossible to redo that transparency effect for menu shadow:

image

Second, I don't know where to find these 3D checkboxes, indeed they're familiar but they're not in Windows 3.1:

image

@aybe
Copy link
Collaborator Author

aybe commented Jul 18, 2024

never mind, I just remembered you posted one... good old sound forge :)

@aybe
Copy link
Collaborator Author

aybe commented Jul 18, 2024

One thing with CTL3D is that it doesn't propagate theme:

krnl386_018

krnl386_021

Original:

krnl386_019

krnl386_020

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants