themix-project / oomox-gtk-theme

Oomox-gtk-theme is a fork of Numix-gtk-theme with slightly different visual design choices and more customization capabilities. It can be used in Themix/Oomox app.
https://github.com/themix-project/oomox
GNU General Public License v3.0
42 stars 8 forks source link

Cinnamon Theme - proper initial commit #29

Closed smurphos closed 6 years ago

smurphos commented 6 years ago

Hi there,

I managed to find some time and got a conversion of my cinnamon theme to SCSS done and have integrated it into the build for Oomox-GTK-Theme. I've tried with the test color schemes and it looks pretty good - screenshots in the link below. However I am sure there are more tweaks that could be applied. Feel free to modify as you see fit.

Still to do: comment the SCSS sections - will try and do that this week. Still to do: thumbnail creations - this is out of my knowledge. The default cinnamon theme thumbnail is included for the time being.

The theme uses unmodified $roundness throughout for border-radius and %GRADIENT% to modify the backgrounds. As currently written a %GRADIENT% of 0 will result in the background of most elements being a uniform 50% mix of $bg_color and $dark_bg_color. A %GRADIENT% of 0.5 will give gradients between $bg_color and $dark_bg_color. Perhaps this should be a gradient of 1?

I have also incorporated the possibility to make some elements of the Cinnamon Theme transparent via %CINNAMON_OPACITY% - this defaults to 1 - fully opaque.

screenshot from 2018-03-13 10-29-52 screenshot from 2018-03-13 10-30-10 screenshot from 2018-03-13 10-30-25 screenshot from 2018-03-13 10-31-14 screenshot from 2018-03-13 10-31-59 screenshot from 2018-03-13 10-32-16 screenshot from 2018-03-13 10-33-20 screenshot from 2018-03-13 10-33-43 screenshot from 2018-03-13 10-33-53

actionless commented 6 years ago

Iis that possible to make all cinnamon surfaces look approximately like CSD headerbar?

That looks like a problem on the screenshots of medium-light colorscheme (on light and dark ones that's not noticeable because BG and MENU_BG are set to the same color).

Gradient on buttons looks a bit more stronger than in GTK theme but could be fine for the beginning if the problem above will be resolved

smurphos commented 6 years ago

Hi, I'll tinker a bit more tomorrow with the code to try and do that.

Cinnamon's theme engine is a bit limited in that it doesn't parse things like mix(color1,color2,x) in the final CSS so the options for matching are a bit more limited.

actionless commented 6 years ago

hm, mb it can be refactored to have a mix_func() scss function which will return a real color?

smurphos commented 6 years ago

It's OK - I think I just need to define a variable for each end color in _global and do the maths there. Background gradients now sorted and I've also tweaked the button gradients and fixed the cinnamon tooltip so it matches the GTK tooltip. The gradient calculations emulate your linear gradient function.

Next is the contentious issue of borders ;-).

I was considering using $wm_border_focused for any 'exterior' borders - e.g inside panel edges, outside of the menu, pop up menus, calendar and OSD items. What do you think?

actionless commented 6 years ago

nice, you've managed rather quickly!

I was considering using $wm_border_focused for any 'exterior' borders - e.g inside panel edges, outside of the menu, pop up menus, calendar and OSD items. What do you think?

if focusing them makes active window unfocused -- then for sure yes

but again, since i am not using cinnamon, i am not really opiniated on this, just trying to make sure it looks more or less similar to the gtk/metacity theme

smurphos commented 6 years ago

No they don't unfocus the window so I'll scrap that idea. I really should be doing some paid work right now so I'll need to log off for the timebeing. As you haven't got a cinnamon machine to test I'll update with more screenshots tomorrow. Monovedek looks much better now and I'm getting quite attached to Monovedek_lcars ;-)

actionless commented 6 years ago

sure, take your time, we don't have any deadlines here ;-)

speaking of lcars: i am currently finishing one feature this week, it already helped me to generate really authentic/atmospheric lcars themes:

https://imgur.com/a/m2Cwb

smurphos commented 6 years ago

Nice.

I've removed some unused cinnamon assets and added support for theme colors in the remaining assets in use. Made a few more minor tweaks to buttons borders. I think the rest of the borders are OK as is.

From my point of view other than a proper thumbnail and commenting the SCSS I think this is pretty much ready to go.

Cinnamon has a nice inbuilt screen recorder. There are 4 short screengrabs attached; 3 for the test themes and one for one of my color profiles.

Cimmamon_demo.zip

smurphos commented 6 years ago

One more tweak to the button hover effect.

actionless commented 6 years ago

looks great! i only can't understand why on screencast monovedek.webm the border is different than on others, it seems like instead of mixing MENU_BG and MENU_FG you are mixing MENU_BG and FG (haven't looked to the code yet)

smurphos commented 6 years ago

It's using BG and FG for the border mixing currently.

$borders_color: mix($bg_color, $fg_color, if(lightness($bg_color) < 50%, .18, .1));

Not sure why but in monovdek this is resolving to the same color as $fg_color which is the same as $dark_bg_color. This is using the standard sascc mix.

Edit - it's resolving to $fg_color in all cases.....

Further edit - looks like mix is expecting values between 1 and 100 not 0.1 to 1

I do most of my work on a Mint 18 (so xenial) based machine and originally got sassc from a now defunt Budgie PPA. I've got sassc version 3.4.2 and libsass 3.4.3. Maybe I should compile from source?

actionless commented 6 years ago

in that case try using menu bg/fg for computing the borders

i am not sure, i have libsass 3.4.7 and sassc 3.4.2

smurphos commented 6 years ago

It works as it should with $borders_color: mix($bg_color, $fg_color, if(lightness($bg_color) < 50%, 18%, 10%)); so I've pushed a fix. The sections are commented now as-well.

smurphos commented 6 years ago

Sorry for the extra commits - I'm done now.

actionless commented 6 years ago

cool! mb couple of screenshots?

actionless commented 6 years ago

also oomox gui is now ready for the integration:

https://github.com/actionless/oomox/commit/ab7552e8b3d611f0ebde50c0f6e0f8a57d50ec3b

smurphos commented 6 years ago

Here you go - updated screen-records with all commits to date applied. I am 99% sure I'm happy with it now.

180316_Cinnamon_Demo.zip

smurphos commented 6 years ago

99.5% ;-)

smurphos commented 6 years ago

99.8%

actionless commented 6 years ago

that's already impressing! will be waiting for your "100%" confirm before merging :-)

smurphos commented 6 years ago

100% - good to go.

actionless commented 6 years ago

:fireworks: :champagne:

actionless commented 6 years ago

updated oomox gui:

2018-03-16--1521199400_1754x1477_scrot 2018-03-16--1521199136_1565x1478_scrot

smurphos commented 6 years ago

Excellent! Pleasure working with you.

actionless commented 6 years ago

same!

smurphos commented 6 years ago

Hi,

I think the Makefile needs some additional rules to work properly from Oomox GUI and/or oomox-plugin.py needs tweaking.

When I tick the box only for Cinnamon I don't get any GTK3 produced at all. If I tick the box for Cinnamon & only my GTK version I get a make error make: *** No rule to make target 'gtk3 css_cinnamon'. Stop.

I've tried this in the makefile

gtk3: clean gresource_gtk3
gtk3 css_cinnamon: clean gresource_gtk3 css_cinnamon
gtk320: clean gresource_gtk320
gtk320 css_cinnamon: clean gresource_gtk320 css_cinnamon
all: clean gresource css_cinnamon

This fixes the first problem, but not the second...??

This is on a GTK3.18.9 box

actionless commented 6 years ago

mb you didn't updated submodule? i've just double-checked all possible combinations of buttons in export options and all of them worked as expected

actionless commented 6 years ago

make sure oomox is on 4b08bf7074aae064c81d60b3d344ad013fbdbfce and oomox-gtk-theme is on 24840964162c851f003e0316a38236513082ba82

smurphos commented 6 years ago

Hi, Yep I was missing your commit to the change-colors script. That's fixed the 2nd issue. I've redownloaded direct from your repos and now I'm getting.

1) No boxes ticked - GTK3 and GTK 3.20 2) Cinnamon box ticked only - still only the getting the Cinnamon Theme and no GTK. 3) Cinnamon and only generate GTK for current version ticked - this is working fine.

I think oomox-plugin.py is passing make-opts of only "css_cinnamon" in the 2nd instance. Maybe an extra else is needed...e.g.

if self.export_config[OPTION_GTK3_CURRENT_VERSION_ONLY]:
            if Gtk.get_minor_version() >= 20:
                make_opts += ["gtk320"]
            else:
                make_opts += ["gtk3"]
else:
  make_opts +=["gtk3 gtk320"]
if self.export_config[OPTION_EXPORT_CINNAMON_THEME]:
   make_opts += ["css_cinnamon"]
if make_opts:
            self.command += [
                "--make-opts", " ".join(make_opts),
actionless commented 6 years ago

yup, you right, i've misssed this case

actionless commented 6 years ago

pushed the fix

smurphos commented 6 years ago

Yep just tested it and it works fine with the extra else statement.

I'm having fun looking at the cinnamon theme in the various presets. Looks pretty good in most and works in all I've tried so far. I have spotted another minor fix needed - just for the visibility of the search icon in the menu search bar. Will submit a PR.