[Solved]Pale Moon + lightweight themes: display of tabs (#2)

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-01, 18:56

So, to keep in line with it, an example of a "very difficult" bright-text theme with proper visual glue and slightly better text contrast on inactive tabs:
visual-glue.png
For most themes the border will not be as pronounced as here. I'm aware that this causes a break in toolbar background images but that is inherent to having tabs on top and requiring this kind of visual aid. The lower opacity of the shading should be sufficient to not make a hard edge.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-01, 19:04

^ I think this looks great! :thumbup:

Could you do the same for bright themes, so when you have the tabs on top, the active tab always appears merged with the Navigation bar?
Moonchild wrote:The other points though, we simply have to disagree on.
I think the above screenshot looks much more "finished". If this is implemented with the next version, I'm happy!!
Last edited by Antonius32 on 2015-03-03, 15:54, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-01, 19:36

Of course I'll do the same for bright lightweight themes, as well as the same changes for the Linux theming.
I've tweaked it a little more here and there.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-01, 19:44

Great! Thank you, Moonchild!

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1742
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by trava90 » 2015-03-01, 20:58

Moonchild wrote:Yeah the commit should fix both situations, since it will no longer override the persona with the system text color.
I can confirm it works for me when using both dark and light system theme.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-01, 21:05

trava90 wrote:
Moonchild wrote: ...the commit should fix both situations...
I can confirm it works for me when using both dark and light system theme.
Thanks for testing! :) :thumbup:
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-01, 22:58

@Moonchild: I noticed that in a recent version a change was made to display an inverted icon for the All Tabs button when a dark (bright-text) theme is in use. Currently the Tab Strip Close button (which can be enabled by setting the value for browser.tabs.closeButtons to 3) and the Close buttons for the Sidebar, the Add-on bar and the Find bar are still displayed with the regular (non-inverted) Close button icon when a dark theme is in use, and while you're at it, I thought you might want to fix that as well. It can be done with with the following CSS:

Code: Select all

#TabsToolbar > .tabs-closebutton:-moz-lwtheme-brighttext,
#sidebar-header > .tabs-closebutton:-moz-lwtheme-brighttext,
#addonbar-closebutton:-moz-lwtheme-brighttext,
.findbar-closebutton:-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close-inverted.png");
}
If you want to test the code in a userChrome file, don't forget to add the !important declaration!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-02, 00:30

Antonius32 wrote: Currently the Tab Strip Close button ... and the Close buttons for the Sidebar, the Add-on bar and the Find bar are still displayed with the regular (non-inverted) Close button icon when a dark theme is in use
Thanks - I didn't think of those buttons when creating the inverted ones for the tab close function on dark personas. :)
Thanks for pointing out that I had forgotten them, and since I'm doing front-end css anyway right now, may as well fix it up proper ;)

The code is close, but can be made a bit more generic (the tabs-closebutton class is only used for these features) and globally applicable as a result. it also needs to be put split out to keep things grouped, but for an override file it certainly works the way you posted it ;)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-02, 00:38

Moonchild wrote:The code is close, but can be made a bit more generic (the tabs-closebutton class is only used for these features) and globally applicable as a result.
If you use the tabs-closebutton class name without further specification, the Close button in the All Tabs view is targeted as well, and I think that's undesirable, don't you agree?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-02, 01:14

Yup, but that's still better done with an override based on Element ID since it's a special case as far as styling goes :)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-02, 01:20

Moonchild wrote:Yup, but that's still better done with an override based on Element ID since it's a special case as far as styling goes
Do you mean the proper way to do this is to first target the tabs-closebutton class as a whole, and then make an exception for the All Tabs view?

Like this:

Code: Select all

.tabs-closebutton:-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close-inverted.png");
}

#allTabs-tab-close-button:-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close.png");
}
Oh, and I have one more question with regard to the screenshot you posted earlier: don't you think this change could prove problematic for truly dark / black themes?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-02, 09:23

Antonius32 wrote:Do you mean the proper way to do this is to first target the tabs-closebutton class as a whole, and then make an exception for the All Tabs view?
If you want to approach it logically, yes.
That way, if there are any other items with the class (which would normally need to styling) they will pick it up. The exception element (because of where it's used) will pick up the more specific rule.
Antonius32 wrote:don't you think this change could prove problematic for truly dark / black themes?
No, why would it? Pure black themes are limited to begin with, same as pure white. You can't make black blacker or white whiter.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-02, 14:09

Moonchild wrote:No, why would it? Pure black themes are limited to begin with, same as pure white. You can't make black blacker or white whiter.
All right. I don't actually use a black theme, I was just thinking along with you. :)
Off-topic:
My extension, Blue Moon Linux, modifies both the Tab Strip Close button and the Sidebar Close button, but targets the first element in one style sheet, and the second in another. Currently the Tab Strip Close button is targeted with this selector:

Code: Select all

#TabsToolbar > .tabs-closebutton
and the Sidebar Close button with this one:

Code: Select all

#sidebar-header > .tabs-closebutton
If I'd target the tabs-closebutton class (that consists of three elements) as a whole in this case, I'd have to override that for two elements in each style sheet. What do you think would be the best solution here?
Last edited by Antonius32 on 2015-03-02, 14:59, edited 2 times in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-02, 14:58

Off-topic:
Antonius32 wrote:What do you think would be the best solution here?
Which ever one you are most comfortable with :) It's your extension and your coding style!
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-02, 15:12

Off-topic:
Moonchild wrote:Which ever one you are most comfortable with :) It's your extension and your coding style!
:) I think in this case, it's best to target only specific elements, so I'll just leave things the way they are.
Last edited by Antonius32 on 2015-03-05, 15:02, edited 2 times in total.

riiis
Lunatic
Lunatic
Posts: 471
Joined: 2014-05-17, 15:51
Location: USA

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by riiis » 2015-03-02, 15:33

The Personas Expression add-on may provide a suitable work-around. This add-on uses the sidebar for its many formatting options. The launch button for the personas-expression sidebar can be found in the status bar.

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-05, 16:31

Antonius32 wrote:If you use the tabs-closebutton class name without further specification, the Close button in the All Tabs view is targeted as well, and I think that's undesirable, don't you agree?
Moonchild wrote:Yup, but that's still better done with an override based on Element ID since it's a special case as far as styling goes :)
You probably actually meant like this, correct?

Code: Select all

.tabs-closebutton:not(#allTabs-tab-close-button):-moz-lwtheme-brighttext {
  list-style-image: url("chrome://global/skin/icons/close-inverted.png");
}

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Moonchild » 2015-03-05, 17:57

Um well, I meant more as different rules for sake of logic/clarity, but you should be able to compact it into one like that, I think. I tend to just have cascading rules, myself - much easier to work with, and it's called cascading styles for a reason ;)
Besides, ID overrides class, anyway.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: Pale Moon + lightweight themes: display of tabs (#2)

Unread post by Antonius32 » 2015-03-05, 18:44

Moonchild wrote:I meant more as different rules for sake of logic/clarity (...)
Ah, so you did mean having two separate rules, as in my first example. Thank you for clarifying.

User avatar
Antonius32
Add-ons Team
Add-ons Team
Posts: 695
Joined: 2014-05-25, 11:18
Location: Netherlands

Re: [Solved]Pale Moon + lightweight themes: display of tabs

Unread post by Antonius32 » 2015-03-19, 20:03

I really like the new colour scheme for lightweight themes. Thank you, Moonchild!

Locked