Titlebar text colour based on persona

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
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Titlebar text colour based on persona

Unread post by Lootyhoof » 2015-03-16, 23:09

Currently, when a persona is used, the titlebar text is black, whether the persona is light or dark; if it's dark, you can't see the text. What I propose is:

Code: Select all

/* Make titlebar text light/dark depending on persona */
#main-window:-moz-lwtheme-brighttext:after{
    color: white !important;
}
#main-window:-moz-lwtheme-darktext:after{
     color: black !important;
}
Or something similar to that if not that. It'd make it much easier to see the titlebar text depending on what persona is used.

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

Re: Titlebar text colour based on persona

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

Interesting thought, but I think the text colour for the Title bar is actually determined by the OS theme. If you have a lightweight theme installed, just activate the Menu bar and you'll find that the Title bar is no longer affected by the lightweight theme, but looks just like the Title bar for other applications. So changing the Title bar text colour based on the lightweight theme that's used would be problematic for people who actively use the Menu bar, who use a lightweight theme that doesn't match their OS theme (bright-text or non bright-text)...

New Tobin Paradigm

Re: Titlebar text colour based on persona

Unread post by New Tobin Paradigm » 2015-03-19, 02:59

This is when we are in AppMenu/No menubar mode wjere we draw it.. This would NOT affect the normal system drawn titlebar in menubar mode

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

Re: Titlebar text colour based on persona

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

Matt A Tobin wrote:This is when we are in AppMenu/No menubar mode wjere we draw it.. This would NOT affect the normal system drawn titlebar in menubar mode
I've just tested the code, and you're absolutely right - it does not affect the Title bar when the Menu bar is active. Well, in that case, I think Lootyhoof has a good point here, and I hope the solution he/she proposes will be implemented in a future version of Pale Moon!

By the way, I think that if you change the text colour, you don't need the text shadow anymore. The following code changes the Title bar text colour and removes the text shadow for dark Personas:

Code: Select all

/* Make Title bar text white and remove text shadow for dark Personas */
#main-window:-moz-lwtheme-brighttext:after {
  color: white !important;
  text-shadow: none !important;
}

User avatar
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: Titlebar text colour based on persona

Unread post by Lootyhoof » 2015-03-19, 13:09

You can probably apply the same to -darktext really, as text shadow is only really there for extra clarity on the glassy title bars, which would otherwise not be glassy when a persona is applied.

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

Re: Titlebar text colour based on persona

Unread post by Moonchild » 2015-03-19, 17:33

Lootyhoof wrote:You can probably apply the same to -darktext really, as text shadow is only really there for extra clarity on the glassy title bars, which would otherwise not be glassy when a persona is applied.
Actually, keeping the opposite contrast shadow is a good thing. There are many themes that have e.g. bright text but where the top of the persona is fairly light - without the shadow you would not be able to see the title anymore.

I'll have a look at making the title more adaptive to personae.
"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: Titlebar text colour based on persona

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

I think for many dark themes, changing the Title bar text colour to white and hiding the text shadow benefits both legibility and looks:
Pale Moon + dark lightweight theme - Title bar text.png
But I do realise that for themes that are lighter towards the top, doing this could prove problematic...
Moonchild wrote:I'll have a look at making the title more adaptive to personae.
Great, thank you!
You do not have the required permissions to view the files attached to this post.

User avatar
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: Titlebar text colour based on persona

Unread post by Lootyhoof » 2015-04-13, 11:42

Potentially a more elegant solution to this, come to think of it:

Code: Select all

#main-window:-moz-lwtheme:after {
  color: inherit !important;
  text-shadow: inherit !important;
}
This way, the titlebar text's colour and shadow are both determined by the persona in use.