The browser title shifts to the left when the text size changes in the system

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.
dtc01

The browser title shifts to the left when the text size changes in the system

Unread post by dtc01 » 2021-02-05, 18:09

The browser title shifts to the left in Windows 10 when the text size changes in the system and scale 125%.


System: Windows 10 20H2, Pale Moon 29, theme - default browser

Windows 10 -> Settings -> Display:

Image


Image

New Tobin Paradigm

Re: The browser title shifts to the left when the text size changes in the system

Unread post by New Tobin Paradigm » 2021-02-05, 18:14

Since having the app menu enabled means the titlebar is fake, custom drawn, so is the window title text and you can only do so much to really get it to look right for everyone. Though because it is a fake and custom drawn and this is a XUL Application you can use userChrome.css to fuck with it.

So snap to it.

RESOLVED WONTFIX

dtc01

Re: The browser title shifts to the left when the text size changes in the system

Unread post by dtc01 » 2021-02-05, 18:19

New Tobin Paradigm wrote:
2021-02-05, 18:14
Since having the app menu enabled means the titlebar is fake, custom drawn, so is the window title text and you can only do so much to really get it to look right for everyone. Though because it is a fake and custom drawn and this is a XUL Application you can use userChrome.css to fuck with it.

RESOLVED WONTFIX
This is not fake, check under Windows 10

New Tobin Paradigm

Re: The browser title shifts to the left when the text size changes in the system

Unread post by New Tobin Paradigm » 2021-02-05, 18:39

You misunderstand. How the browser can draw anything in the titlebar like the blue Pale Moon menu, the App Menu, is a bunch of fakery. It actually can't. How it SEEMINGLY does it is it tells the Window not to have a window frame at all and then draws emulating the style of that window frame including the titlebar its self. So the titlebar, the appmenu and the titlebar text are part of what is known as the client area which is the part of a window the application has access to. SINCE this is the case that means the titlebar text can be changed with CSS including margins, padding, boarders, text style, alignment.. Anything..

So the solution is to create a css rule for it that just increases the margin or padding on the left to accommodate the odd metrics and dpi you have set in Windows.

dtc01

Re: The browser title shifts to the left when the text size changes in the system

Unread post by dtc01 » 2021-02-05, 18:54

New Tobin Paradigm wrote:
2021-02-05, 18:39
You misunderstand. How the browser can draw anything in the titlebar like the blue Pale Moon menu, the App Menu, is a bunch of fakery. It actually can't. How it SEEMINGLY does it is it tells the Window not to have a window frame at all and then draws emulating the style of that window frame including the titlebar its self. So the titlebar, the appmenu and the titlebar text are part of what is known as the client area which is the part of a window the application has access to. SINCE this is the case that means the titlebar text can be changed with CSS including margins, padding, boarders, text style, alignment.. Anything..

So the solution is to create a css rule for it that just increases the margin or padding on the left to accommodate the odd metrics and dpi you have set in Windows.
It's hard for me to understand, I'm not a programmer.
I also used to increase the text in GNOME 3, setting the text size increase factor to 1.4, as in Windows 10-143%, but there is no way to check under GNU/Linux.
If you think that the PM is not to blame for the incorrect display of the title, then the question is closed.

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

Re: The browser title shifts to the left when the text size changes in the system

Unread post by Moonchild » 2021-02-05, 19:10

I have win 10 20H2 as well and I do not have that second slider. i just have the general DPI setting (which you have set to 125%)
So I don't know where you got that from (and since it's in Russian I don't know 123 what it says)

EDIT: Ah, found it. this is under "ease of access" not under "Display".
We can't do anything about that because the custom disjointed font scaling for accessibility (that is specifically for the visually impaired!) is not something we can get metrics of. So the result is that the title becomes slightly too wide for the maximum usable space in the title bar. Too bad, can't be helped.
"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

Locked