jake-phy / WindowIconList

GNU General Public License v2.0
75 stars 26 forks source link

Providing a sylesheet.css #38

Closed ghost closed 8 years ago

ghost commented 10 years ago

Is it possible for you to provide a stylesheet file for this applet?It would make it possible to seamlessly integrate it into themes.

Thanks.

jake-phy commented 10 years ago

I'll get right on it

ghost commented 10 years ago

I'm playing with style class and i fully recomend you to use the same style class name of the cinnamon compatible applet.

Then you can set your own style different from cinnamon and continues used the default theme of cinnamon. this.actor.set_style_class_name('cinnamon-style'); //set the style class of the actor(the cinnamon one).

this.actor.add_style_class_name('menu-mystyle'); //override the style class of the actor with a new style(your own .css).

Cinnamon style have more priority than user style, so you need see how you can handle that.

jake-phy commented 10 years ago

Yeah I know. It seems backward to have the cinnamon class have more priority than than a applets stylesheet. If you use this.actor.set_style("padding:5px"); it works fine but not if you just add a class from you stylesheet. That is the only thing stopping me from completely implementing a stylesheet. I haven't been able to get a response from a dev either.

zagortenay333 commented 9 years ago

Any chances of this getting implemented any time soon? Pleeease

ghost commented 9 years ago

@jake-phy you can not use your own style and a global one at the same time (cinnamon not allow you to do that). To provide a default style you need to use an existing selector (a default one), then to allow theme authors to be more specific, you need provide a new one. You can not be able to use your own style (because is local), but theme author can use it and this is the idea, because your style can not be compatible with the current theme, only the author of theme can do that as global. If the style don't modify colors, you not need to use a default theme, because on this case a local one can be apply and can be overridden by theme authors... Create a local style when is needed used a color involved the usage of different colors to the current theme and your applet.

ghost commented 9 years ago

And yes, use a default existing selector(and not use style on the code) will involved that you can not control well as possible how your applet is displayed, so when cinnamon default theme is loading or theme author not provide the specific selector, your applet will not be see all good as possible. Is a decision that you need to make. If used a style in code or not. If you use style in code theme author can not override your decision, but your applet will be displayed better when a selector is not provide.

Thats is a think that also @zagortenay333, not understand, give all facilities to theme author will create problems to be displayed when the selector is not provide and cinnamon not provide selector to the external applet. The user use normally the default theme. So, on my opinion you need to provide a balanced applet, try to not use style in code when is possible.

jake-phy commented 9 years ago

Oh yes I'm working on it. I have ran into several issues though that I am working through. I will be working on this applet fairly steady for the next month or so.

How quick will theme creators create styles for this applet?

-----Original Message----- From: "zagortenay333" notifications@github.com Sent: ‎2/‎22/‎2015 4:33 AM To: "jake-phy/WindowIconList" WindowIconList@noreply.github.com Cc: "jake-phy" jake.phy@gmail.com Subject: Re: [WindowIconList] Providing a sylesheet.css (#38)

Any chances of this getting implemented? Pleeease — Reply to this email directly or view it on GitHub.

ghost commented 9 years ago

@jake-phy the first 10 best cinnamon themes are handled by @zagortenay333, and he is fast, but the another theme authors, possible never include support to your applet, because they not include support to any external applet normally. I consider that the rest of theme authors could not be considered importance (except maybe one or two), but you need warranty the support for the cinnamon standard theme, this is the most used on my opinion. I normally take a lot of time searching on the cinnamon theme a selector that satisfy the requirements. Is not easy find one but when is found the rest is easy.

One trick when you don't find a selector, could be repeat the actor and on the first actor only put one selector that have a color and in the another create a local selector with your padding and the thing that you need, but without color. This will help you to satisfy requirements if you don't find an appropriate selector.

zagortenay333 commented 9 years ago

@jake-phy That could be an issue. I am currently maintaining 6 themes (numix, zukitwo, new-minty, and the 3 ciliora themes), and I will give support insta.

Unfortunately, many popular themes are completely abandoned. For example, the following are all abandoned by their authors since 1-2 years: Void, Minty, Baldr, Tyr Jord, Android Holo, Loki, Fainece+, Gnome, Tyr Himin, Nadia. They are unlikely to get updated at all/any time soon.

Is it not possible to make some kind of a selector hierarchy ( I know nothing about programming btw), so that the applet first looks for a style under a specific selector, and if it doesn't find it, then it looks for the next selector which is presumably one of the standard selectors?

ghost commented 9 years ago

@zagortenay333 thats is not possible, unfortunately and this is not the problem. The problem is that you need to use a selector that are not made thinking on your applet, so could be adapted well on some themes (if you have luck), but on others not and this not have a solution. The only solution is adjust the selector on code, but in this case you can not be able of modify it on your themes. This is why on my applets and desklets i don't allowed you to modify some things. This things have not an appropriate selector and i need to fixed using style on code. Fortunately i can provide an style also for this things, so only some properties that i set on code cannot be modify, the another's properties can be...

jake-phy commented 9 years ago

I'll see what I can do. I wanted to get away from using styles in the code, but as I am going off of the switcher-list styles, there are some major padding and spacing that I will have to override. I will post a screen shot of what i have this evening sometime so you can review it zagor.

ghost commented 9 years ago

@jake-phy there are some problem with the lasted cinnamon version and your applet:

_refreshList: function () {
    ...
    list.appGroup.destroy();  //here there are problems.
    ...
}

 _onFavsChanged: function () {  //here to...
        if(this._reload())
            this.emit('changed');
 },
zagortenay333 commented 9 years ago

Any progress so far?

jake-phy commented 9 years ago

Yeah I have it mostly done. Ran into more issues than I thought I would. I should be able to upload it tonight. 😊 think I said that already. As a theme developer, is it important to be able to set the padding and spacing of the thumbnails? Or can I set that in the applet?
Currently it is set at 8px in the applet. I'm going off the switcher-list classes and I think they are set at 16px of padding :( I'm thinking 6px or so would look better.

-----Original Message----- From: "zagortenay333" notifications@github.com Sent: ‎3/‎4/‎2015 1:10 PM To: "jake-phy/WindowIconList" WindowIconList@noreply.github.com Cc: "jake-phy" jake.phy@gmail.com Subject: Re: [WindowIconList] Providing a sylesheet.css (#38)

Any progress so far? — Reply to this email directly or view it on GitHub.

zagortenay333 commented 9 years ago

Awesome!

Can't tell you about the padding 'till I try it out.

jake-phy commented 9 years ago

Ok i have it uploaded on the development branch. Padding currently set at 5px.

zagortenay333 commented 9 years ago

OK, I just tried it out, and I'm afraid I still have a huge problems. This applet is looking at the .popup-menu-content selector, and I need to be able to override that somehow, or else I have a huge problem with my ciliora themes. :cry: https://github.com/zagortenay333/ciliora-tertia-cinnamon/blob/4ac9ecf847edeaa0f42c5d2aae1ec57e3d2e4b20/Ciliora-Tertia/cinnamon/cinnamon.css#L248 I can't even begin doing anything with the stylesheet until I can override this.

The other problem is that there seems to be additional padding at the top and bottom of the icons in the panel. It's the same issue mentioned in https://github.com/jake-phy/WindowIconList/issues/79 Apart from the problem mentioned in that issue it also looks ugly screenshot from 2015-03-05 13 47 45 Notice how the highlight effect on the window list goes all the way to the edge of the panel, but not on this applet. That additional padding seems to be 1px.

Btw, is it possible to also include a selector for the window counter in the panel?

zagortenay333 commented 9 years ago

If it's not possible to override the .popup-menu-content selector, could you add a border-image: none; to the applets code?

Virtually nobody will use this property in this particular selector, so they won't be affected by this at all. Those that do use this property here would benefit from this, so it would be a win-win.

jake-phy commented 9 years ago

I will look into it. Thanks for the feedback. And the theme 😊

-----Original Message----- From: "zagortenay333" notifications@github.com Sent: ‎3/‎5/‎2015 7:57 AM To: "jake-phy/WindowIconList" WindowIconList@noreply.github.com Cc: "jake-phy" jake.phy@gmail.com Subject: Re: [WindowIconList] Providing a sylesheet.css (#38)

If it's not possible to override the .popup-menu-content selector, could you add a border-image: none; to the applets code? Virtually nobody will use this property in this particular selector, so they won't be affected by this at all. Those that do use this property here would benefit from this, so it would be a win-win. — Reply to this email directly or view it on GitHub.

jake-phy commented 9 years ago

Ok I have made some changes to the style-sheet. Can you check it again and give me some feedback.

ghost commented 9 years ago

popup-menu-content is apply on the standar desklet and applet rigth click menu, also apply over the left click menu on applet, and can be override adding an style to the box actor:

https://github.com/linuxmint/Cinnamon/blob/13d10c528603ee0316dcf608993e30f7e7decbc9/js/ui/popupMenu.js#L874

jake-phy commented 9 years ago

Right, I should have been more clear. I have replaced that style class with one of my own.

zagortenay333 commented 9 years ago

Big improvements!

The lack of padding in the .thumbnail-row selector is a big issue for me it seems. I cannot make the applet blend in with the rest of the theme without it. It also gets the thumbnails too close to the panel. screenshot from 2015-03-08 12 42 38 This is how it should look: screenshot from 2015-03-08 12 42 42

Also, it would be really nice if the tooltips used the tooltips styling. screenshot from 2015-03-08 12 45 05

jake-phy commented 9 years ago

Ok the padding should be working now with the last push (not release :). I have to keep restrictions on it though for the default cinnamon theme. I'll see about the tooltip. Not promising anything.

zagortenay333 commented 9 years ago

Thanks. Unless someone plans to make a theme with 20px borders, this should be more than enough. Would it be possible to also make that window counter themable?

LMJulianS commented 9 years ago

Is there a possibility to define the size of the pinned icons? I would like to draw a line under the Icon when hovering it, similar as it is in Windows 10 preview. With the normal size the icons fill the whole panel height so that there is no room for additional highlights! taskbar

jake-phy commented 9 years ago

I'll see if I can. I have a Microsoft test coming up in two weeks so it will be abit until that happens.

-----Original Message----- From: "LMJulianS" notifications@github.com Sent: ‎3/‎19/‎2015 11:05 AM To: "jake-phy/WindowIconList" WindowIconList@noreply.github.com Cc: "jake-phy" jake.phy@gmail.com Subject: Re: [WindowIconList] Providing a sylesheet.css (#38)

Is there a possibility to define the size of the pinned icons? I would like to draw a line under the Icon when hovering it, similar as it is in Windows 10 preview.

— Reply to this email directly or view it on GitHub.

LMJulianS commented 9 years ago

Another thing I realized is when setting the panel height in a cinnamon theme (and configure the panel in the panel settings, that it takes the themes height) ur applet scales with the panel height whereas other applet (like "force quit") don't. Do you have an advise for me how you achieve this?

jake-phy commented 9 years ago

I think there is a setting in the panel settings that allow other icons to scale also. For my applet I'm getting the panel size and creating an icon texture accordingly.

-----Original Message----- From: "LMJulianS" notifications@github.com Sent: ‎3/‎23/‎2015 7:05 PM To: "jake-phy/WindowIconList" WindowIconList@noreply.github.com Cc: "jake-phy" jake.phy@gmail.com Subject: Re: [WindowIconList] Providing a sylesheet.css (#38)

Another thing I realized is when setting the panel height in a cinnamon theme (and configure the panel in the panel settings, that it takes the themes height) ur applet scales with the panel height whereas other applet (like "force quit") don't. Do you have an advise for me how you achieve this? — Reply to this email directly or view it on GitHub.

zagortenay333 commented 9 years ago

Is this ready for deployment yet? I'll soon make a big update to my cinna themes and would like to include this as well.

jake-phy commented 8 years ago

There has been a few more styles added. Should be pretty themeable now.