Titlebar font

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: Titlebar font

Unread post by Moonchild » 2014-03-22, 18:27

tribaljet wrote:I should've added that I'm using small icons, and with regular icons it's aligned properly.
Ahh.. I'll have a look at that then. Small icon mode would possibly be the cause as it moves the urlbar up.

EDIT: nope. I thought I had already countered for that and sure, as-is, small icons is OK too:
pm-win8-smallicons1.jpg
"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
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35631
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Titlebar font

Unread post by Moonchild » 2014-03-22, 18:47

As a workaround for your own setup, you can tweak it for your own purpose though if there's a potential issue (custom styling, add-ons, etc.).
I'd still like to know what causes it, of course, but you should have a fix with the following userChrome.css (maybe need to tweak the positions a little, +=down -=up)

Code: Select all

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only add this if you don't have it yet */

@media all and (-moz-windows-compositor) {
  @media not all and (-moz-windows-glass) {

    #main-window::after {
      top: -15px !important;
    }

    #main-window[sizemode="maximized"]::after {
      top: -7px !important;
    }

  } 
}
"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
tribaljet
Lunatic
Lunatic
Posts: 468
Joined: 2012-06-06, 19:45
Location: Portugal
Contact:

Re: Titlebar font

Unread post by tribaljet » 2014-03-22, 18:56

That does indeed sort things out. I've had to change values a bit:

Code: Select all

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* 

only add this if you don't have it yet */

@media all and (-moz-windows-compositor) {
  @media not all and (-moz-windows-glass) {

    #main-window::after {
      top: -15px !important;
    }

    #main-window[sizemode="maximized"]::after {
      top: -10px !important;
    }

  }
}
Portuguese translator of Pale Moon

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

Re: Titlebar font

Unread post by Moonchild » 2014-03-22, 19:12

Still curious and I don't know why it would be different for you. I checked all different permutations and normally used operating systems when developing this feature and it all looks OK for me. Did you change any specific preferences for scaling/rendering? Are you using any UI add-ons?
Last edited by Moonchild on 2014-03-22, 19:13, edited 1 time in total.
Reason: typoes...
"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
tribaljet
Lunatic
Lunatic
Posts: 468
Joined: 2012-06-06, 19:45
Location: Portugal
Contact:

Re: Titlebar font

Unread post by tribaljet » 2014-03-22, 22:55

The only thing that might or might not be relevant is that the Calomel addon is on the left of the address bar and it's slightly taller than the rest of the buttons. Aside from that, I'm using gfx.font_rendering.cleartype_params.rendering_mode set to 5.
Portuguese translator of Pale Moon

jumba

Re: Titlebar font

Unread post by jumba » 2014-03-23, 13:45

Try with this combination:
small icons
no menu bar
no bookmarks toolbar

and in full screen maximized I get the same result as tribaljet.

Edit: ops, I'm also using this tool to reduce the window borders in win8, http://winaero.com/comment.php?comment.news.96
at 4px border (default) it shows correctly.
same for you, tribaljet?
Last edited by jumba on 2014-03-23, 18:08, edited 1 time in total.

User avatar
tribaljet
Lunatic
Lunatic
Posts: 468
Joined: 2012-06-06, 19:45
Location: Portugal
Contact:

Re: Titlebar font

Unread post by tribaljet » 2014-03-23, 17:25

jumba, when you say full screen, you mean maximized, right? And your combination of settings is exactly what I'm using, yes.

I did change border size through registry, so it's similar to what the tool does.

I was under the impression that the border's outside was merely visual padding and not so much emcopassing the whole titlebar text area, so it might explain the issue. What if the text position is calculated from the inside rather than from the outside as default, given that's a static position?
Portuguese translator of Pale Moon

jumba

Re: Titlebar font

Unread post by jumba » 2014-03-23, 18:24

Yes I meant maximized window! :)

If I use the tool the opposite, to increase the border size, this is what happens,

Pale Moon title bar remains with the same width but the title text moves up to the "right" position as if the title bar would be thicker,
maxborder_title.png
For other windows the border shows like this:
maxborder.png

User avatar
tribaljet
Lunatic
Lunatic
Posts: 468
Joined: 2012-06-06, 19:45
Location: Portugal
Contact:

Re: Titlebar font

Unread post by tribaljet » 2014-03-23, 18:50

Those unruly borders :D

Well, if the borders behave like that, I guess it might be tricky to have a standard userChrome.css that will work for everyone.
Portuguese translator of Pale Moon

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

Re: Titlebar font

Unread post by Moonchild » 2014-03-23, 19:27

Unfortunately, the window metrics are calculated as an offset from the actual window edge (which is the outside edge).
If you change the default window metrics by hacking the registry, either with a tool or manually, then it will affect the placement of the title.

I'll see if it is possible to make it dependent on the inner edge but it'll need some research and trial&error.

The title is a bit of a special case since it is bound to the actual browser window (top level), other elements are relative to the UI content's bounding box so in most cases, userChrome.css will work regardless of border thickness.
"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