mate-desktop / mate-themes

Official themes for the MATE desktop
https://mate-desktop.org
GNU Lesser General Public License v2.1
76 stars 45 forks source link

theme dev talk #101

Closed raveit65 closed 8 years ago

raveit65 commented 8 years ago

themes needs a rewrite to 3.20

raveit65 commented 8 years ago

I did :smile: All that padding/margin hell comes from gtk+ upstream. https://git.gnome.org/browse/gtk+/tree/gtk/theme/Adwaita/gtk-contained.css#n2708

raveit65 commented 8 years ago

As workaround for mate-terminal issue i set a min height/width for the vbox at top level. I did that for all themes. I hope you agree with me to do that with BlackMATE ;) I think we should add a prefered height/width directly in mate-terminal code.

lukefromdc commented 8 years ago

I most certainly DO agree with that and will add it right away to my own theme as well. This issue with the terminal has been a serious nuisance to me but I've been busy with other issues and other things.

On 3/6/2016 at 12:01 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

As workaround for mate-terminal issue i set a min height/width for the vbox at top level. I did that for all themes. I hope you agree with me to do that with BlackMATE ;) I think we should add a prefered height/width directly in mate- terminal code.


Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-192934319

monsta commented 8 years ago

@lukefromdc: BTW, if you wish, you can change your status to "Public" on https://github.com/orgs/mate-desktop/people page, and it will be indicated in your public GitHub profile :smile:

lukefromdc commented 8 years ago

Just fixed a bug on where Cpufreq-applet labels came up incomplete in BlackMATE in the GTK 3.14, GTK3.16, GTK 3.18, and master branches. Same fix also fixed the panel rendering 1px above the bottom of the screen. In Master also fixed jumping buttons, and matched the tasklist buttons to the GTK 3.18 behavior with the current panel.

Only thing is, the GTK 3.20 branch is far enough out of sync with master that it could not be automatically merged. I still can't log in over the terminal, do you want to deal with this or for me to manually update mate-applications.css in the GTK 3.20 branch?

raveit65 commented 8 years ago

In gtk+-3.20 branch, try 'git cherry-pick commit-id' commit-id = the commit you want to pick from master (or any other branch), than 'git push'. The commit-id you get with 'git log' in master branch. This is how i work with master and gtk-3.20 branch and should work. The merge command try to sync all commits between both branches. With cherry-pick only one commit goes into the other branch. And yes, i know for some reasons both branches have differences,.....dunno why...to much commits. Let me know if it does not work , than i can help out.

raveit65 commented 8 years ago

Btw, i will try so sync the branches if i have a bit free time

lukefromdc commented 8 years ago

The error I get is not being recognized by the remote-I cannot log in over the terminal at all. As is usual throughout Linux, the GUI used by the website is rather limited in what it can do.

On 3/30/2016 at 6:03 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

In gtk+-3.20 branch, try 'git cherry-pick commit-id' commit-id = the commit you want to pick from master (or any other branch), than 'git push'. The commit-id you get with 'git log' in master branch. This is how i work with master and gtk-3.20 branch and should work. The merge command try to sync all commits between both branches. With cherry-pick only one commit goes into the other branch. And yes, i know for some reasons both branches have differences,.....dunno why...to much commits. Let me know if it does not work , than i can help out.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-203658365

raveit65 commented 8 years ago

Done.

[rave@mother mate-themes]$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
[rave@mother mate-themes]$ git log
commit 6ea810a2f9442eb929b8d455593ad99f0679b118
Author: lukefromdc <lukefromdc@hushmail.com>
Date:   Wed Mar 30 17:22:19 2016 -0400

    GTK 3.20 correct for recent mate-panel changes

    Fix cpufreq applet unit labels not showing up when panel restarted-must use 0px padding
    Fix panel rendering 1px above bottom of screen-must use padding 0px as panel default
    BlackMATE is one of the few themes using a non-zero default padding value, I had to fix some wierd bugs in the panel with all GTK versions

    GTK 3-20 specific fixes:
    Stop jumping panel buttons
    Match tasklist and calendar buttons to  GTK 3.16 and 3.18  results with current panel versions, highlight only active/checked window's button

commit 177c67e0896e6cf7ac9822a60a3ccbd9ace00778
Author: raveit65 <chat-to-me@raveit.de>
Date:   Sun Mar 27 18:00:49 2016 +0200

    ship a HighContrast metacity-theme-1.xml

commit 27472adb8e7a74f12b7a99a86dc03d1ede84865c
Author: raveit65 <chat-to-me@raveit.de>
Date:   Wed Mar 30 14:16:50 2016 +0200

    drop ContrastHigh theme, gtk+ ship that already

commit f2349e078cdddc4f0fc04d1ed4942d48bdb4e3bb
Author: raveit65 <chat-to-me@raveit.de>
Date:   Mon Mar 28 12:40:26 2016 +0200

    fix POTFILES.in

commit 406802bc6f8939415ffc51a429aab948ce216571
[rave@mother mate-themes]$ git checkout gtk3.20 
Switched to branch 'gtk3.20'
Your branch is up-to-date with 'origin/gtk3.20'.
[rave@mother mate-themes]$ git cherry-pick 6ea810a2f9442eb929b8d455593ad99f0679b118
[gtk3.20 2663ab9] GTK 3.20 correct for recent mate-panel changes
 Author: lukefromdc <lukefromdc@hushmail.com>
 Date: Wed Mar 30 17:22:19 2016 -0400
 1 file changed, 29 insertions(+), 32 deletions(-)
[rave@mother mate-themes]$ git push
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.14 KiB | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
To git@github.com:mate-desktop/mate-themes.git
   b540f5d..2663ab9  gtk3.20 -> gtk3.20
[rave@mother mate-themes]$ 

:smile:

raveit65 commented 8 years ago

I use a ssh key in my git configuration, so i don't need to login from panel. Anyways, commit on master, give me a notice and i will cherry-pick the commits to gtk-3.20 branch. Np, i'm very happy that you maintain BlackMate.

raveit65 commented 8 years ago

I've renamed this topic as port to gtk+-3.20 is mainly done and on 100% in our roadmap. http://wiki.mate-desktop.org/roadmap So we can use this topic to communicate. Only port of GreenLaguna is missing but i'm to tired now after all this action to start with this theme. I added a configure flag (default =disable) for this theme for 3.20 and master branch. Maybe i will find my motivation again to port it or it will be dropped in future.

raveit65 commented 8 years ago

@lukefromdc Hi Luke, i create a diff between master and 3.20 branch. Most differences are in BlackMate, can you pls take a look into it? https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/diff-matethemes.patch I will fix the few po files which differ. This should be the course of the merge problem.

raveit65 commented 8 years ago

well, i guess master branch have the right settings ;)

raveit65 commented 8 years ago

this commit was missing in3.20 branch https://github.com/mate-desktop/mate-themes/commit/f9800e949d520c04c6de5f3f4a54993a2704edde I cherry-picked it, hope that i didn't break anything. Now only mate-application and other-applications differs. Looks like another commit is missing.

raveit65 commented 8 years ago

Hmm, the changes are here https://github.com/mate-desktop/mate-themes/commit/a1dedb76a66580dbe067a63640befaad865ba2cd but i can't cherry-pick the commit because this will change other files. So we need to fix those files with a new commit. This means the branches are same but differ from commits, in result a merge is not possible anymore. But i see no other solution. So i leave that for you. Please fix those files and do a new commit on 3.20 branch for this.

lukefromdc commented 8 years ago

I can fix this manually by simply replacing the text of each .css file in BlackMATE with that of the same text from the files in master from the website if that is OK by you.

On 4/1/2016 at 1:12 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

@lukefromdc Hi Luke, i create a diff between master and 3.20 branch. Most differences are in BlackMate, can you pls take a look into it? https://dl.dropboxusercontent.com/u/49862637/Mate- desktop/Bugs/diff-matethemes.patch I will fix the few po files which differ. This should be the course of the merge problem.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-204474864

raveit65 commented 8 years ago

sure :)

lukefromdc commented 8 years ago

Two missing BlackMATE commits found, fixed by manual file edit, followed by merge from Master.

On 4/1/2016 at 4:25 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

sure :)


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-204555590

raveit65 commented 8 years ago

Fine master and gtk+-3.20 is in sync :) Btw. i plan to do a new release in 10 days or so, to have a new tarball for fedora beta release.

raveit65 commented 8 years ago

You don't like to use the mate logo for spinner animation for BlackMate? See, other themes how it works.

raveit65 commented 8 years ago

And there is a double image on close button from CSD applications. Should i adjust window-controls.css for 3.20?

lukefromdc commented 8 years ago

Go for it

On 4/2/2016 at 5:44 AM, "Wolfgang Ulbrich" notifications@github.com wrote:

And there is a double image on close button from CSD applications. Should i adjust window-controls.css for 3.20?


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-204682941

lukefromdc commented 8 years ago

More likely I was just using something I knew to work, not a matter of not liking something. Probably I didn't know that was even used in an older version. If you want to change it that's fine by me and a rather nice touch for it. Spinner code is one of those things that GTK tends to change from version to version.

On 4/2/2016 at 5:37 AM, "Wolfgang Ulbrich" notifications@github.com wrote:

You don't like to use the mate logo for spinner animation for BlackMate? See, other themes how it works.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-204682640

raveit65 commented 8 years ago

More likely I was just using something I knew to work, not a matter of not liking something. Probably I didn't know that was even used in an older version. If you want to change it that's fine by me and a rather nice touch for it. Spinner code is one of those things that GTK tends to change from version to version.

yeah, spinner settings are changed, like everything :) Ok, i will adjust those settings, i did that for the other themes already. The idea was to use a symbolic icon from mate-icon-theme with the logo. Because the mate logo is round, it is a perfect gimmick.

raveit65 commented 8 years ago

@lukefromdc Here are some improvements for CSD settings. https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/Bugs/blackmate_csd.patch

lukefromdc commented 8 years ago

Black corners in CSD issues don't occur with composition enabled in Marco, and I use a patched version of compiz to eliminate it. Ubuntu refuses to apply the patch to permit Compiz to be recognized by GTK as a compositor because it creates a gap with tiled windows unless the theme sets the margin (and not the box shadow apparently) to zero for a tiled window. I never use tiling, so for me the patch is essential to my compiz builds.

Speaking of patches, will apply yours to BlackMATE

On 4/3/2016 at 11:24 AM, "Wolfgang Ulbrich" notifications@github.com wrote:

@lukefromdc Here are some improvements for CSD settings. https://dl.dropboxusercontent.com/u/49862637/Mate- desktop/Bugs/blackmate_csd.patch

  • using border radius 0px for solid-csd (w/o compositor) fixes the black corners from csd windows, which comes from shadows. (gtk+ or marco issue)
  • border color is the same like for other windows
  • missing selector messagedialog.csd
  • settings for backdrop state, testable in cinnamon.
  • new deprecation GtkComboBox-shadow-type which spams the terminal, i don't know if there is an replacement for it.

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-204995210

lukefromdc commented 8 years ago

Apparently one of the GTK 3.20 changes was that box shadows now control their own space around the window, independent of the margin setting. I am hoping to hardcode non-shadowed/1px margin CSD windows into compiz so Ubuntu can upstream Albert's patch. It will have to use both the GTK 3.18 AND the GTK 3.20 selectors, letting the unused ones silently be ignored.

On 4/3/2016 at 11:24 AM, "Wolfgang Ulbrich" notifications@github.com wrote:

@lukefromdc Here are some improvements for CSD settings. https://dl.dropboxusercontent.com/u/49862637/Mate- desktop/Bugs/blackmate_csd.patch

  • using border radius 0px for solid-csd (w/o compositor) fixes the black corners from csd windows, which comes from shadows. (gtk+ or marco issue)
  • border color is the same like for other windows
  • missing selector messagedialog.csd
  • settings for backdrop state, testable in cinnamon.
  • new deprecation GtkComboBox-shadow-type which spams the terminal, i don't know if there is an replacement for it.

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-204995210

raveit65 commented 8 years ago

I added a new style class for the lock-screen. https://github.com/mate-desktop/mate-screensaver/commit/e3d8ca494335bcea1aa776614ed17c75012e1f2b See, latest git changes for examples. Gtk3-inspector does not start on lock-screen.

lukefromdc commented 8 years ago

I've yet to build or install mate-screensaver as I use full disk encryption rather than lock screens.

On 4/9/2016 at 5:00 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

I added a new style class for the lock-screen. https://github.com/mate-desktop/mate- screensaver/commit/e3d8ca494335bcea1aa776614ed17c75012e1f2b See, latest git changes for examples. Gtk3-inspector does not start on lock-screen.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-207853692

raveit65 commented 8 years ago

Ok, i will add some settings for BlackMate.

lukefromdc commented 8 years ago

Thanks, I appereciate that as I am in a very busy weekend right now with another matter.

On 4/9/2016 at 6:38 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

Ok, i will add some settings for BlackMate.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-207866877

raveit65 commented 8 years ago

Hi, i re-created 3.20 branch from master because there was some double commits. I don't know exactly why this could happen, but for the future i suggest not to merge master in 3.20 branch or or the other way around. I will cherry-pick your changes between both branches, so commit only on one branch from them. I suggest also to delete you repo and fork it new to have a new clean copy.

Thanks, Wolfgang

lukefromdc commented 8 years ago

Good idea, I'tt take care of that and will commit to Master by default.

On 4/10/2016 at 4:50 PM, "Wolfgang Ulbrich" notifications@github.com wrote:

Hi, i re-created 3.20 branch from master because there was some double commits. I don't know exactly why this could happen, but for the future i suggest not to merge master in 3.20 branch or or the other way around. I will cherry-pick your changes between both branches, so commit only on one branch from them. I suggest also to delete you repo and fork it new to have a new clean copy.

Thanks, Wolfgang


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-208068612

raveit65 commented 8 years ago

Do you understand what the user means with 'glitches' in other gtk+-3.20 report?

lukefromdc commented 8 years ago

Not really, but looks like he had trouble with the theme going to the wrong directory and with video drivers.

lukefromdc commented 8 years ago

Just found Libreoffice has issues over GTK 3.20 with ALL themes, Adwaita included. Custom widgets again almost for sure, don't know their porting status. At least with 3.20 in Debian Experimental right now, Debian will soon be building over GTK 3.20 in Unstable so their theme support code will get built. More details at https://github.com/mate-desktop/mate-themes/issues/92 which was reported against BlackMATE, I added a comment at the bottom after finding EVERY theme killed either the menus or else one column in the "Options/Application Colors" window,which I had never opened before. The menus are fine in dark themes, they look like BlackMATE or my own theme even in the Submarine themes. Libreoffice says they support Firefox themes, so they will probably always theme differently then most apps/

raveit65 commented 8 years ago

Well, the libreoffice gtk2 version was well known for issues with dark themes. I recall that i tried to fix something there some years ago, but i was impossible because because if you change something you change it in another place too. Also they hardcoded some stuff, same as firefox. The fact that they blocked gtk3-inspector too makes it impossible to support them. How should i found out which selector i have to use? And using try and error or copying parts of another theme which works in the theme cost to much time for people who get not paid for this.

lukefromdc commented 8 years ago

Heads up: first breakage in GTk 3.21 already-commit below breaks setting fonts in Pluma and in themes, causing them to render 5 sizes smaller than before. Setting them in pts for 3.21 works but doesn't work right in 3.20, ballooning them 5 sizes larger. Will see if this gets debugged or sticks around.

https://git.gnome.org/browse/gtk+/commit/?id=df08fc91bdc1d2e4c866122304fabe4dd298a7de

css: always get default font size in pixels Fixes a couple bugs...

We'll always grab the default font size in pixels so we don't keep confusing things.

Worth noting that gtk css font-size will still behave differently than the web. Pango interprets font-size differently.

raveit65 commented 8 years ago

Good to know. personal i won't install fedora rawhide before f24 release in june, so this is really future music for me. But i can create a gtk-3.22 branch for m-t if you like.

lukefromdc commented 8 years ago

Good idea, we need to get ahead of this. So far I found breakage where a theme specifies a font size, only got that in my own theme. Also found breakage in Pluma, not sure how to fix that, probably there will be a Gedit commit sometime that tells how to do this.

On 4/18/2016 at 7:51 PM, "NO NAME" notifications@github.com wrote:

Good to know. personal i won't install fedora rawhide before f24 release in june, so this is really future music for me. But i can create a gtk-3.22 branch for m-t if you like.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-211636766

raveit65 commented 8 years ago

Found a nice page for style selectors conversion. https://wiki.gnome.org/Projects/GTK%2B/StyleClasses

raveit65 commented 8 years ago

Menus in BlackMate needs a bit love ;) There is a conflict with using a vertical background-image for menu and menuitem:hover. Probably a gtk+ bug. You can solve that with using horizontal direction for menu, after that it's possible to enable the transition effect for menuitem again. Ie.

 menu,
 menubar  menu,
 menuitem  menu {
    background-color: shade(@theme_selected_bg_color, 0.8);
    background-image: linear-gradient(to left,
                                      @theme_selected_bg_color,
                                      shade(@theme_selected_bg_color, 0.5));
    border-style: none;
    border-width: 0px;
    border-radius: 0;
    padding: 1px;
}

Also i would use background-image and border-image: none for disabled state. And menu arrows aren't visible. There are wrong selectors in css, ie osd.and others. For OSD we use .osd button and button.osd. This is testable with gnome-weather or parole mediaplayer from xfce.

raveit65 commented 8 years ago

Btw. i can fix that stuff if you agree.

lukefromdc commented 8 years ago

Go for it, I have no experience working with transitions. BTW, I've finally got Firefox with GTK 3.20, pretty in my theme with a couple bugs: sliders same color as trough, and I get bare checks for the checkboxes with the usual theme ignored-in ALL themes.

One thing that helped my theme a lot in Firefox: a border around sliders will make them visible in Firefox and a lot easier to use. In fact, of all themes I have mine works best in FF-GTK3 even though it got no adjustments for it, due to the slider issue.

On 4/26/2016 at 6:29 AM, "NO NAME" notifications@github.com wrote:

Btw. i can fix that stuff if you agree.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- themes/issues/101#issuecomment-214696455

lukefromdc commented 8 years ago

Someone on Phoronix linked to this article with a CSS file for Firefox that fixes invisible checkboxes etc on Firefox GTK 3 with dark themes and GTK 3.20:

http://forums.fedoraforum.org/showthread.php?t=304493

raveit65 commented 8 years ago

The solution is simple, firefox use a mix of old and new theme syntax. menu menuitem .radio menu menuitem .check I fixed this for Menta themes and BlackMate.

raveit65 commented 8 years ago

btw. are there check and radio boxes at other places?

raveit65 commented 8 years ago

And here is the explanation of it. https://developer.gnome.org/gtk3/stable/GtkRadioButton.html#id-1.3.9.4.10.9 A GtkRadioButton without indicator changes the name of its main node to button and adds a .radio style class to it

lukefromdc commented 8 years ago

Check and radio boxes also appear in website content and in extension preference dialogs (notably NoScript). Used this code to fix them in my theme, had to split them out from two-part animated checkboxes used elsewhere as a background image can't be used under them in Firefox:

/*for Firefox (FIXME-will this cause unwanted matches?*/
.check:checked  {
    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked.svg")); 
}

.check:checked:hover,
.check:active:hover  {
    -gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-glow.svg")); 
}

.radio:checked {
    -gtk-icon-source: -gtk-scaled(url("assets/radio-checked.svg"));
}

.button {
    border-image: url("assets/button-border-dark.svg") 3 / 3px stretch;
}

Got simliar results fixing scrollbars with .slider, now working on many other theme elements. When I get this done, I will then do the same for BlackMATE, and this will be a guide for fixing these in other themes

raveit65 commented 8 years ago

Why .check:active:hover ? I think this is a remnant from state conversion with gtk+-3.14. and a hover:active state don't exists for check and radio. I used only checked:hover in last commits.