Closed Grizzly-Adam closed 6 years ago
Looks nice! Please note the textcolor and app_textcolor could be set to other value in theme definition. I see the icon texts should be in other color. For the button labels on desktop you can try the app_textcolor '#000000' setting.
I like more themes, agree to add more. @Gerold55 ?
By the way, it is possible to set default theme for hardware defintion using "custom_theme = "
Yes, I have used both text colours. Note the different colour used in the clock. I will try black for the text, although darker colours tested did make it less readable. Ideally we could add an icon text background colour, like in windows.
I will make three more themes that pay tribute to older operating systems.
Clouds(Windows 95) Argyle (Windows 3.xx) Circuit Board (Early MacOS)
More themes are always welcome 👍 we need a better variety than what we have at the moment 😊👍
@Grizzly-Adam maybe you can also make a theme pack.
If I do I will have to get more inspired. Each one I have planned is a love letter to an old os and are iconic in their own way.
Argyle theme. It's a bit busy, but that's how it was on windows. Not the actual argyle from windows, but an original version inspired by it.
Headed to bed for the night, but here is a sneak peak at the circuit wallpaper. This is based on old 64x64 repeating tile wallpaper from MacOs back in the mid-90s. Once again, completely original work designed to be reminscent of the original.
OK, here is the circuit theme in place. I wish I had a pic of the old circuit theme on MacOs.
Is it possible to make the clock and associated button move to the top of the screen via theme settings? If not, could it be written in?
It could be written in into apps/launcher_app.lua , just replace the hard-coded "11,9.8;4,0.7" by mtos.theme.laucher_clock_pos and set the previous value to the default (fallback) theme in themes.lua Same way if you need something other configurable by theme. More complex things could be moved to theme method like the themed buttons
...maybe the both "Exit" and "Back" buttons inside the appwindow_formspec_func could be usefull...
And the Clouds theme. This one is based on the popular background for Windows 95. I included the ugly green background colour they force down our throats as the text colour. The window bar (not shown here) is the dark blue to aqua gradient bar from Windows 98.
Bell-- I will take a the method you suggested above.
OK, what am I doing wrong?
circuit_theme.lua
laptop.register_theme("Circuit", { launcher_bg = "laptop_theme_circuit_launcher_bg.png", app_bg = "laptop_theme_circuit_app_bg.png", major_button = "laptop_theme_circuit_minor_button.png", minor_button = "laptop_theme_circuit_minor_button.png", back_button = "blank.png", exit_button = "blank.png", app_button = "blank.png", textcolor = "#000000", app_textcolor = "#ffffff", taskbar = "top", })
from launcher_app.lua
` local taskbar_position = laptop.get_theme(taskbar) -- local taskbar_position = "top"
if taskbar_position == "top" then
taskbar = "11,-.35;4,0.7"
else
if taskbar_position == "float" then
taskbar = "11,4.8;4,0.7"
else
taskbar = "11,9.8;4,0.7"
end end
out = out..mtos.theme:get_button(taskbar, "major", "os_clock", os.date("%c"))
return out
end,`
I can uncomment the second line and make the if/then work so I must be looking it up wrong.
local taskbar_position = laptop.get_theme(taskbar)
Two mistakes in this line
1: theme is "circuit", and the "taskbar" is only an attribute, so the right will be taskbar_position = laptop.get_theme("circuit").taskbar
2: You do not need to do the get_theme() because of already done by framework
local taskbar_position = mtos.theme.taskbar
or just use directly mtos.theme.taskbar instead of taskbar_position.
PS: note: the "elseif" exists in lua, so you can save 1x "end" in your code ;-)
PS2: Maybe beter to write directly clock position to the theme,like
laptop.register_theme("Circuit", {
...
taskbar_clock_position_and_size = "11,-.35;4,0.7"
})
and
out = out..mtos.theme:get_button(mtos.theme.taskbar_clock_position_and_size, "major", "os_clock", os.date("%c"))
So themes could be more individual
Brilliant! I was so close lol.
Anyway, here is the new code snippet for launcher_app.lua I did have to add an if statement to set a fallback value. Do I need to do a pull request to get this added?
if mtos.theme.taskbar_clock_position_and_size== nil then mtos.theme.taskbar_clock_position_and_size ="11,9.8;4,0.7" end
out = out..mtos.theme:get_button(mtos.theme.taskbar_clock_position_and_size, "major", "os_clock", os.date("%c"))
return out<
Where is the app title bar text color set? They should be able to be changed by themes as well.
You need to have a look to the themes.lua and the "Freedom" theme. This theme should be allways complete because used as fallback for other themes.
I did have to add an if statement to set a fallback value.
No, you can remove it again, just set the value to the Feedom theme
Where is the app title bar text color set?
It is the "app_bg" texture. (Maybe we need to rename some theme parameters to be more understandeable...)
You can just use an other texture or colorize them usins [^[colorize
](https://github.com/minetest/minetest/blob/backport-0.4/doc/lua_api.txt#L485) texture modifiers or any other texture modifier
Not the bar itself, the white text in the bar. All the themes have white text.
Oh, sorry, long time, the "app_bg" is the whole background used in all apps. The titlebar text is not themed at the time. See "launcher_app.lua"
if app.app_info then
if #mtos.sysram.stack > 0 then
formspec = formspec.."label[0.8,-0.29;"..app.app_info.."]"
else
formspec = formspec.."label[-0.1,-0.29;"..app.app_info.."]"
end
end
You can change the code to use mtos.theme:get_label("0.8,-0.29", app.app_info, "titlebar")
And define thetitlebar_textcolor
theme attribute
Ok, I have sent a pull request to merge changes and add the four new themes. They are all a bit different than pictured as I have made more tweaks to make them more reminiscent of their original systems.
And here are the screens:
Argyle:
Circuit
Clouds
Snow Pines
Done in #87, Thanks again!
One more, Amiga inspired. This one is called Boing! and based off of the legendary bouncing ball demo for the Amiga.
Also, I feel the the Fruit Theme is very week and should be removed.
I was playing earlier with my son and he couldn't find a theme he liked. Maybe more themes, maybe just cull the less interesting and add some more strong ones.
Here is one I just made, if you are interested. I have ideas for a few more that can be associated with some of the older computers.