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

Themes #102

Closed
10 tasks done
Gerold55 opened this issue Feb 26, 2018 · 83 comments
Closed
10 tasks done

Themes #102

Gerold55 opened this issue Feb 26, 2018 · 83 comments

Comments

@Gerold55
Copy link
Owner

Gerold55 commented Feb 26, 2018

Should we be able to make the icons customizable like the other things of the theme?

Last-To-Do List

  • for chest game we can set os_min_version to a value higher then the monochrome versions.
  • All other themes needs to be tested and adjusted for new parameters.
  • I try to merge our and my branch, then I add "monochrome" parameter and adjust tetris to colorize all by the cs-bos console textcolor in this case
  • replace default_diamond_block.png in tetris app by own "gray" texture
  • Please change/rename also theme.bgcolor2 to something prefixed (theme.second_bgcolor ?)- EDIT: they are textures, so name both bgcolor to _background. bgcolor is reserved for rgb-values
  • adjust default bgcolor rgb values and port more unicolor textures to mtos.theme:get_bgcolor_box()
  • Check texture filename prefixes for "laptop_*.png". Check unused textures could be deleted
  • Check/Update API.md documentation
  • Check/Update the README.md
  • Clarify if tty_monochrome should be setteable by theme (ember and green theme)
@Gerold55
Copy link
Owner Author

@Grizzly-Adam if I send you some pics of a new theme created by CrossZover could you implement them for me?

@Grizzly-Adam
Copy link
Contributor

I think that would be a good option for future.

Yes, I can impliment them as soon as bell releases the cs-bos update. I dont want to delay it any further.

@Gerold55
Copy link
Owner Author

Ok because @Crosszover has 2 new plain red and blue themes ready. Also a new PCPack is being worked on.

@Grizzly-Adam
Copy link
Contributor

Oh! Can I make a couple suggestions for the new PC pack?

@Grizzly-Adam
Copy link
Contributor

Pls send me those images so I can work on this tonight.

@Gerold55
Copy link
Owner Author

I'll send them tonight after I'm done working

@Gerold55
Copy link
Owner Author

@Grizzly-Adam do you have a business email so I can send them to you?

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Feb 28, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 2, 2018

I did the tables themeable too

- `table_background` - Table background color
- `table_color` - Table text color
- `table_highlight` - Table highlighted background
- `table_highlight_text` - Table highlighted textcolor
- `table_border` -  draw border (true or false)

@Gerold55, @Grizzly-Adam, can you please propose values for "Default/Freedom" theme and may adjust existing themes?
See my pr_tables_theming branch.

I set currently as demo-values:

		table_background='#000000',
		table_color='#FFFFFF',
		table_highlight='#FFFF00',
		table_highlight_text='#0000FF',
		table_border='false',

@Grizzly-Adam
Copy link
Contributor

I am working late today, got a door tech here. Will try them layer if I get out soon.

@Grizzly-Adam
Copy link
Contributor

I have been working on skinning the mail program and was planning to ask you for more theme options to make it all work. I will try these ones and let you know if I need any more fields added (I was thinking something similar to the contrast colors, but with the main theme color (just not tied to other attributes).
Anyway, I will work on it and let you know what I need

Sorry guy, I didn't get a lot done but I got out of work several hours late tonight.

@Grizzly-Adam
Copy link
Contributor

Is it still possible to override CS-BOS text color when registering hardware? I have a computer running 1.10 that I would like to give a monochrome green monitor.

@bell07
Copy link
Collaborator

bell07 commented Mar 3, 2018

At the time - no. But I can implement it. It does sense since this color is more depending on hardware then on software version..

@bell07
Copy link
Collaborator

bell07 commented Mar 3, 2018

I removed my branched and pushed all my new changes to my master: https://github.com/bell07/minetest-laptop

For more systematic attribute names shema I renamed the table parameters to:

- `table_bgcolor` - Table background color
- `table_textcolor` - Table text color
- `table_highlight_bgcolor` - Table highlighted background
- `table_highlight_textcolor` - Table highlighted textcolor
- `table_border` -  draw border (true or false)

Can you please provide the default values to me or set up a branch that I can merge?

which theming option do you like to have in addition? Let me know so I can implement it as I find time.

I was thinking something similar to the contrast colors, but with the main theme color (just not tied to other attributes)

This should be simple as the "prefixes" does work generic

Example: new prefix "abc"
you set an abc_button = "laptop_abc_button.png" and abc_textcolor = "#123456"
you can use theme:get_button('x,y;w,h', 'abc', code, text) theme:get_label('x,y', text, 'abc')

They are two challanges:

  • find a meaningfull name for "abc"
  • find default values for Freedom theme - as the default theme should be allways complete because elements used as fallback in other themes

Is it still possible to override CS-BOS text color when registering hardware? I have a computer running 1.10 that I would like to give a monochrome green monitor.

I added the option hwdef.tty_style, so you can set the tty_style='AMBER', tty_style='GREEN' or tty_style='WHITE' to the hardware definition.
If you need more colors, you need to add new colors to "supported_textcolors" table in cs-bos_app.lua file, or provide the value to me

@bell07 bell07 mentioned this issue Mar 3, 2018
@bell07
Copy link
Collaborator

bell07 commented Mar 3, 2018

Added support for textures replacement in themes:
You can define in theme now

	texture_replacements = {
		['laptop_email_trash.png'] = 'laptop_themed_trash.png',
	}

to replace the email trash button icon if an theme is selected.

works with all theme:get_image_button() (all buttons in mail_app) and if the new method theme:(get_texture) is used (bomb or boom in TNTSweeper). Should be complete, if something missed, let me know. The tetris is difficult because additional texutre colorization is used.

@bell07
Copy link
Collaborator

bell07 commented Mar 3, 2018

added support for texture_replacements in launcher to replace the app icons...

@bell07
Copy link
Collaborator

bell07 commented Mar 10, 2018

Should we be able to make the icons customizable like the other things of the theme?

this is done by texture_replacements support mentioned above

In my more_theming_support branch. The changes could be merged if the tables theming support is finished (Themes adjustment needed to use the new colorizing parameters)

@bell07
Copy link
Collaborator

bell07 commented Mar 11, 2018

added some table colors to themes. @Grizzly-Adam , please check if the colors does match your imagination

@Grizzly-Adam
Copy link
Contributor

Thanks bell07, I will take a look. I am hoping that I can concentrate well enough to fully evaluate it. I am returning to work tomorrow.

@Grizzly-Adam
Copy link
Contributor

@bell07 Give me two more things and I theme I can fully skin the apps to match the themes (except for app specific buttons).

I need:
muted_textcolor (a text color that can be used for things like read mail)
theme_background or uniform_background (a background that is complimentary to the theme-- opposite of contrast background).

@bell07
Copy link
Collaborator

bell07 commented Mar 12, 2018

ok, new prefix "muted"
and value "bgcolor" global or prefixed. "background" is used already for background texture, so the background color is "bgcolor" as I introduced for tables

@bell07
Copy link
Collaborator

bell07 commented Mar 12, 2018

@Grizzly-Adam do you need support you to add the required things?

You need just to add default values for "muted_textcolor" to "bgcolor" to the default theme "Freedom" in themes.lua, then to the other themes if differ. In code you can access the values by "mtos.theme.muted_textcolor" and "mtos.theme.bgcolor" or using prefix in theme:get_* methods.

(except for app specific buttons).

This is possible too with my last changes. Just define in theme

laptop.register_theme("???", {
	desktop_background = 
...
	texture_replacements = {
		['laptop_email_trash.png'] = 'laptop_themed_trash.png',
		['original.png'] = 'themed.png',
	}
})

@bell07
Copy link
Collaborator

bell07 commented Mar 12, 2018

By the way, I am unhappy with "Freedom" as technically fallback theme. The fallback should not be green. The most themes needs to override most values because not green.
My proposal is to move the "Freedom" to own file like the other themes, and then define hidden "default" theme with settings as used in the most themes., then redundancy could be removed from other themes.
The "Freedom" can be still hardcoded as default theme if no theme selected.

@Grizzly-Adam
Copy link
Contributor

I agree, we need something with the typical blues and greys. Either a new basic theme, or use the clouds theme.

@bell07
Copy link
Collaborator

bell07 commented Mar 12, 2018

Are you working on skins colors adjustments? If not I can consolidate the default theme and degrade the Freedom to "usua"l theme in the evening. "default" is hidden hard-coded so it will be really fallback-only definition, with background image = "" and so

@Grizzly-Adam
Copy link
Contributor

I am not currently. Go ahead and make your changes and I will start after work.

@bell07
Copy link
Collaborator

bell07 commented Mar 12, 2018

I done the split of freedom from fallback values and removed all fallback redundancies. more_theming_support
@Grizzly-Adam you can take over again to adjust the themes. If you miss something, just add it or ask me ;-) I think using texture_replacements and the table-colors it is able now to get nearly full monochrome output for old computers

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 13, 2018

All changes are in my git. I will work on the buttons tomorrow. See screenshots.

Can green/black menu in screenshot 1 be changed to match theme?

Can message text area in screenshot 3 be bordered?

screenshot from 2018-03-12 19-10-37
screenshot from 2018-03-12 19-16-11
screenshot from 2018-03-12 19-17-08

@bell07
Copy link
Collaborator

bell07 commented Mar 13, 2018

Can green/black menu in screenshot 1 be changed to match theme?

maybe (needs to be tested) we can change the text color by colorizing the text string using minetest.colorize(color, string)`, but no idea how to theme the green bar and background in dropdown :-(
We have some other not colorizable elements like scrollbars :-(

By the way, I found in lua_api.txt the formspec

box[<X>,<Y>;<W>,<H>;<color>]

  • Simple colored semitransparent box
  • x and y position the box relative to the top left of the menu
  • w and h are the size of box
  • color is color specified as a ColorString

Maybe we can remove all "1-color-backgrounds" and replace them by this command? So we can remove some texture files? I write the theme:get_background(texture or rgb) method to be able to use both, texture and color in "background" settings.

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 17, 2018

I looked all the themes over, made some adjustments (mainly to table colors and textcolor). Amber theme is complete, green theme is now done as well. Improved background on CS-BOS Shell theme. Made all shell themes max_os_version 5.5 max, chess 5.51 min.

@bell07 I think it is just the bottom three items left on your checklist.

@Grizzly-Adam
Copy link
Contributor

@Gerold55 Here is my attempt at sprucing up the printer screen. Looking for input.

screenshot from 2018-03-17 17-46-35

@Gerold55
Copy link
Owner Author

Gerold55 commented Mar 17, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 19, 2018

How about theme.background and theme.alt_background. And you are the one who named the bgcolor to begin with :P

I see we are confused both on the lot of new settings :P
Let consolidate the existing prefixes:

desktop - Launcher Setting (Background only)
desktop_icon - Background for app icon in launcher
desktop_icon_label - THe label under app icon in launcher
app - setting for App Window (Background)
titlebar - The title bar in App window
back - App window back button
exit - App window Exit button
major - Highlighted (Button)
minor - Not highlighted (Button)
muted - ??
contrast - Dark area under not themeable elements
table - Table colorizing
table_highlight - "The green bar" - highlighted table colorizing
status_online - "green"
status_disabled - "yellow"
status_off - "red"

Do you see prefixes we can consolidate? Maybe app, major, minor or muted could be re-used?

I think "Label-Textarea" shoud be themed in same way as the table. So the bgcolor1 is "table_background" (The background image is the same color as table_bgcolor RGB value)

What is the reason for bgcolor2? Do we need new "alt" prefix or we can re-use existing one?

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 19, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 19, 2018

I see some textures are named wrong. All textures needs to be named "laptop_" to avoid overwrites by other mods.
printer_button.png
printer_button1.png (unused?)
printer_printed.png (unused?)
tetris_block.png

I looked all the themes over, made some adjustments (mainly to table colors and textcolor).

Can you please push the changes for review?

I checked the PNG-files, the next of them seems to be not used:
laptop_calendar.png
laptop_email_letter_new.png
laptop_email_trash_B.png
laptop_m_bios.png
laptop_manual.png
laptop_theme_ambershell_mail.png
laptop_theme_greenshell_mail.png
laptop_txt_document.png
printer_button1.png
printer_printed.png

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 19, 2018 via email

@Grizzly-Adam
Copy link
Contributor

I deleted all the mentions files from my install and found no issue. Lets hang onto calendar, bios, manual, and text document (maybe place them in their own repository or something) because we will probably use them later.

Renamed tetris_block.png and printer_button.png. Updated tetris & mail apps, full colour, amber and green shell themes to reflect these changes.

Update pushed.

@bell07
Copy link
Collaborator

bell07 commented Mar 20, 2018

Thank you! I checked all and seems to be fine.

About tetris monochrome theming: I tired the ember theme on CUBE since it is selectable. In tetris the blocks are colorized, because the "tty_monochrome" setting is set in OS version and HW-node, the Cube both does not match. What do you think, should be the "tty_monochrome" setteable on theme too? So tetris will be monochrome on "more modern" devices if ember or green theme selected. (I vote for yes, can do it in evening)

Created new branch to store unused textures: https://github.com/Gerold55/minetest-laptop/tree/unused_textures

The last point is to check README, and API doc if all new things are mentioned. I do rewrite the theming documentation in API, grouped by prefixes in evening

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 20, 2018 via email

@Grizzly-Adam
Copy link
Contributor

The more I thinl about it the better setting tty through theme sounds. It will mean color is no longer tied to os version and we can make any old computer amber, green, or full color regardless of version.

I looked at the reqdme last night and didnt find anything that needed updating.

@bell07
Copy link
Collaborator

bell07 commented Mar 20, 2018

Note we have 2x tty settings:

  1. tty_textcolor - Initially OS-version dependant, but can be set differ for each hardware ("AMBER", "GREEN", "WHITE")
  2. tty_monochrome - Boolean setting if the colors could be changed or not. Used in CS-BOS to disable "TEXTCOLOR" command, and in tetris-app to disable blocks colorizing.

I had the idea to merge tty_textcolor with themes "table_textcolor". But the tty_textcolor value is not RGB and needs to be supported by CS-BOS "TEXTCOLOR" command.

I am about tty_monochrome setting. In CS-BOS the OS-Version and HW setting still should be used, for tetris app the setting should be used from theme ("optimized for monochrome")

@bell07
Copy link
Collaborator

bell07 commented Mar 20, 2018

Introduced theme.monochrome_textcolor is set in both monochrome themes and used in tetris app. This attribute means "theme optimized for monochrome".
Idea happens some other textures could be colorized same way as tetris shape, so we could use gray textures instread of green or amber (needs to be consolidated, maybe next development iteration)

Rewrote the API.md theming area: https://github.com/bell07/minetest-laptop/blob/more_theming_support/API.md#themes

Still unhappy with nex prefixes (not in API.md).
Note: Each prefix can have textures _background and _button, and colors _bgcolor, _textcolor.

Introducing get_bgcolor_box() I added bgcolors to "major" / "minor" / "contrast". Looked to "Save as" dialog.

	app_background -  the "default" app background (white) (prefix "app")

	alt_background -  Underlay under table - prefix "alt" - > should it be prefix table (table_background?)

	background - prefix-less is implemented as fallback. Which idea is in mail app for this texture? Maybe it should be "app" or an other prefix?

P prefer to reduce the count of used prefixes to avoid redundancies

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 20, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 20, 2018

I see the app_background is not usable because of title bar.
can you propose which prefix have which meaning and which of them are maybe redundant and coul be removed?
: major, minor, app, alt, table, muted

We need an explanation for all prefixes, the API should be understandeable for the case a new developer needs to write a fully new theme, the settings meaning should be predictable. Of course all elements was added on need, I try to consolidate them after is known what is needed :-)

"background" needs to be prefixed. I think the "fallback" values without prefix should be removed, (background, bgcolor, textcolor) because irritated.

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 20, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 20, 2018

I did some more consolidation. See my branch / PR to your repo:

  1. I disabled/removed fully the alt_background, did not seen any difference. Tested on greenshell (black vs. black) and on cubic (white vs. grey) and some other themes.
    I do not like the idea for second background over the app_background. If anything needed, the app_background needs to be adjusted, or other elements added.

  2. in mail app now the "table_background" instread of "background". Thesetting it is related to the table set (should be always the same color as RGB bgcolor?)

  3. Removed minor_bgcolor and major_bgcolor (was tech demo for get_bgcolor_box()). Use now the "contrast" and "table_highlight" prefixes in "Save as" dialog.

  4. Updated the API again, reordered settings in default theme (themes.lua) to match the API order

  5. The Ambershell and Greenshell does have the bright color for contrast. The contrast is for "white texts in edit fields" so it should be dark per definition. Can we change them to something more dark?

@Grizzly-Adam
Copy link
Contributor

We don't use anything with the app prefix except app_background,. Maybe fold that into major? You did good figuring out how to remove the need for alt_background. I looked at all the others and it would cause a lot of compromised with our themes to remove any of them. The less options, the less we can emulator computers of various eras.

Re #5 Monochrome contrast. I have tried setting this as dark, but it looks awful because you just end up with a nearly black screen with text that has been tinted not quite the right color. Looks way better orange/green with dark text. It works well and I think we are better leaving it alone. If we change it, we would want to change the background color to orange/green to make the "contrast" color to stand out-- and that hurts the eyes because it becomes too much bright color.

I found a screen that did not get properly monochromed and was hoping you could take a look at it. In os_print_app.lua

screenshot from 2018-03-20 19-13-28

@bell07
Copy link
Collaborator

bell07 commented Mar 21, 2018

We don't use anything with the app prefix except app_background,. Maybe fold that into major?

the meaning content does not match. But maybe the titlebar_textcolor should be "app_textcolor"? Or we should split the background to 2x images: the titlebar and the background? Maybe next iteration, I tink we should finalize the work.

I have tried setting this as dark, but it looks awful because you just end up with a nearly black screen with text that has been tinted not quite the right color. Looks way better orange/green with dark text.

The "contrast" prefix is for "dark background to place under white text elements that does not support textcolor". Of course it looks beter with dark text on orange/green, but not always possible.
The contrast image was used on some other places too, therefore we added "contrast_textcolor" (some labels are placed on contrast background. This color is used to colorize them)

The Print app is a good example.
Ok, the big text preview area I can theme now to "table" since it is not editable, but the "Heading" input field not, therefore the texture under them needs to be dark. The "Heading" label is "contrast_textcolor"

Other screens that needs attention for contrast images are the Text editor, New Mail view, Save as does have filename input fields

@bell07
Copy link
Collaborator

bell07 commented Mar 21, 2018

Applied the "table" theming to the preview in printer app. Changed the Heading underlay to get_bgcolor_box("","contrast"), and Heading text to "contrast_textcolor" that is amber now in amber theme.
image

The table_background under text areas looks strange on themes using "table_border". Maybe you can create new textures for with 1x Pixel border for such "table_background"?

image

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 21, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 21, 2018

The mail app uses the same logic for text area is themed using table prefix ("table_background"). So it should work out of the box for mail, if it does work for print file.
I fear the border line scaling issues because of different area sizes :-(

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 21, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 21, 2018

$ file textures/* | grep '1 x 1'
textures/laptop_theme_ambershell_desktop_icon_label_button.png: PNG image data, 1 x 1, 8-bit/color RGB, non-interlaced
textures/laptop_theme_boing_major_button.png:                   PNG image data, 1 x 1, 8-bit/color RGB, non-interlaced
textures/laptop_theme_clouds_desktop_icon_label_button.png:     PNG image data, 1 x 1, 1-bit colormap, non-interlaced
textures/laptop_theme_colors_light_grey.png:                    PNG image data, 1 x 1, 8-bit/color RGB, non-interlaced
textures/laptop_theme_desktop_icon_label_button_black.png:      PNG image data, 1 x 1, 1-bit colormap, non-interlaced
textures/laptop_theme_desktop_icon_label_button_darkblue.png:   PNG image data, 1 x 1, 8-bit/color RGB, non-interlaced
textures/laptop_theme_desktop_icon_label_button_grey.png:       PNG image data, 1 x 1, 1-bit colormap, non-interlaced
textures/laptop_theme_desktop_icon_label_button_white.png:      PNG image data, 1 x 1, 1-bit colormap, non-interlaced
textures/laptop_theme_greenshell_desktop_icon_label_button.png: PNG image data, 1 x 1, 8-bit/color RGB, non-interlaced
textures/laptop_theme_shell_desktop_icon_label_button.png:      PNG image data, 1 x 1, 8-bit/color RGB, non-interlaced

What do you mean I should test if works? All of them are used as "buttons" textures.

I checked all of them, the next are not used:

  • laptop_theme_colors_light_grey.png
  • laptop_theme_desktop_icon_label_button_darkblue.png

used only for table_color => can be converted to bigger texture with border

  • laptop_theme_desktop_icon_label_button_white.png

Did you tried the borders for "table_background" images?

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 21, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 22, 2018

Found a beter way to solve the border problem: A empty themed table instead of background images.
Implemented, see my branch / the PR in your repo.

Removed again the "table_backgrounds" setting and not used textures

  • laptop_theme_colors_light_grey.png,
  • laptop_theme_desktop_icon_label_button_darkblue.png,
  • laptop_theme_desktop_icon_label_button_white.png

From my point of view all work is done now!
Please review and test the changes if you see something is still missed. If not, we can setup the PR to upstream/master

EDIT: ok, forgot last thing: The "contrast" background should be still dark in ember and green theme. Maybe dark-amber and dark-green instread of black? Maybe with border on texture to avoid "full black screen"?

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 22, 2018 via email

@bell07
Copy link
Collaborator

bell07 commented Mar 23, 2018

Ok, I changed back the "contrast" to amber/green in the both themes. Previously some parts (Write mail screen for example) was colorized using contrast_bgcolor/contrast_textcolor as I expected, but looks not nice.
No rule without exception, the both monochrome themes uses bright background for not themeable white text. Looks beter but more exhausting to read. Like the old monitors ;-)

If you merges my both commits to your branch we can merge them

@bell07
Copy link
Collaborator

bell07 commented Mar 23, 2018

All Changes merged!

@bell07 bell07 closed this as completed Mar 23, 2018
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

No branches or pull requests

3 participants