PM, Aero Glass and Windows 10 Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Octopuss

PM, Aero Glass and Windows 10

Unread post by Octopuss » 2018-11-06, 08:09

There is a tool that brings Aero Glass back to Windows 10 - http://www.glass8.eu/. It even has a GUI for it (somewhere in downloads).
I have a small annoying (and surprising) problem where adjusting any of the glass settings have absolutely no effect on PM. For example, changing the opacity of something called "accent color" makes the titles of other windows transparent, but not PM's.
Can anyone figure out why?

edit:
Actually, there are some Aero settings even in the Themes. Well, nothing in there has any effect on PM.
Last edited by Octopuss on 2018-11-06, 08:23, edited 1 time in total.

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

Re: PM, Aero Glass and Windows 10

Unread post by Lootyhoof » 2018-11-06, 08:48

We have to do a lot of custom styling to the window frame on Windows 10 to make it look as it should.

There's no way we could support such system modifications.
Last edited by Lootyhoof on 2018-11-06, 08:49, edited 1 time in total.

Octopuss

Re: PM, Aero Glass and Windows 10

Unread post by Octopuss » 2018-11-06, 09:28

Lootyhoof wrote:We have to do a lot of custom styling to the window frame on Windows 10 to make it look as it should.

There's no way we could support such system modifications.
See my edit. Some of the stuff is available directly in the system settings.
Capture.PNG
Last edited by Octopuss on 2018-11-06, 09:29, edited 1 time in total.

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

Re: PM, Aero Glass and Windows 10

Unread post by Lootyhoof » 2018-11-06, 09:38

Transparency effects do not ever apply to titlebars on Windows 10.
Last edited by Lootyhoof on 2018-11-06, 09:38, edited 1 time in total.

Octopuss

Re: PM, Aero Glass and Windows 10

Unread post by Octopuss » 2018-11-07, 12:38

Did you even bother clicking on the link btw?


Apply glass look to windows borders
Blur the content behind the borders to improve UI experience
Change amount of transparency in Control panels directly
Change inactive windows borders color
Skin windows borders (add glow, shadows etc.) without changing Windows theme
Fully native including MSStyle themes and DWM API compatibility
Low resources usage
Last edited by Octopuss on 2018-11-07, 12:39, edited 1 time in total.

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

Re: PM, Aero Glass and Windows 10

Unread post by Moonchild » 2018-11-07, 12:56

I'm thinking you haven't understood what Lootyhoof was trying to tell you. We paint our own window frame on Windows (to be able to put things in the title bar, have custom themes, etc.) and your overly-inflated text of "fully native" is therefore exactly why this has no effect. We do not use the native window frame. Period.
"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

Octopuss

Re: PM, Aero Glass and Windows 10

Unread post by Octopuss » 2018-11-07, 13:15

Maybe I understand.
PM doesn't conform to Windows' settings/standards and so it isn't affected by any system settings. Right? If yes, why? I don't see PM looking any different than other Windows programs, so I don't understand why it needs to do the visual part so differently. Obviously there is a good reason for it, but I am not a programmer so I don't get it.

P.S. You don't have to attack me in most of your replies. It's a pattern I noticed a LONG time ago. Maybe I am not the most welcome type of a forum member, but that still doesn't give you any right to sneak snarky/bossy tone into your replies to my posts (and no, don't bother telling me I'm seeing things, because I'm not stupid).
I simply pointed out the tool I linked did all its stuff Windows-natively, so it wasn't any kind of hack someone would have to code additional stuff for in order for his program would work with it.

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

Re: PM, Aero Glass and Windows 10

Unread post by Lootyhoof » 2018-11-07, 13:49

Pale Moon looks relatively native on Windows 10 because of the work that is done in custom drawing the window, rather than in spite of it. Without this there would be many visual glitches, and even the caption buttons themselves (minimise, maximise, close) wouldn't work properly. Due to the custom nature of the window we designed it to look the same as any other window on a clean, default system. Therefore, when someone starts changing things in ways it was not intended, the visuals might not achieve the results you were looking for.

As stated, due to the non-default (and ultimately unsupported as far as Microsoft is concerned) nature of these modifications we would not be able to account for them when drawing the window. Any such issues encountered when doing so would therefore be considered unsupported from our perspective.

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

Re: PM, Aero Glass and Windows 10

Unread post by Moonchild » 2018-11-07, 13:54

I don't see in what way my reply here (or any other for that matter) constitutes an "attack" but if you experience it as such I'll simply refrain from answering you in the future.
If this is somehow related to some grievance you have with me personally, then please, by all means, send me a PM explaining what exactly troubles you so.
"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

Octopuss

Re: PM, Aero Glass and Windows 10

Unread post by Octopuss » 2018-11-07, 19:16

I have absolutely nothing against you. If I had, I wouldn't be using PM or posting here at the very least.
I just feel like most of the time I ask something and you reply, there's an additional (thin, but still) layer of kind of hostility.
Lootyhoof wrote:Pale Moon looks relatively native on Windows 10 because of the work that is done in custom drawing the window, rather than in spite of it. Without this there would be many visual glitches, and even the caption buttons themselves (minimise, maximise, close) wouldn't work properly. Due to the custom nature of the window we designed it to look the same as any other window on a clean, default system. Therefore, when someone starts changing things in ways it was not intended, the visuals might not achieve the results you were looking for.

As stated, due to the non-default (and ultimately unsupported as far as Microsoft is concerned) nature of these modifications we would not be able to account for them when drawing the window. Any such issues encountered when doing so would therefore be considered unsupported from our perspective.
That's good enough non-technical answer I guess.
Last edited by Octopuss on 2018-11-07, 19:17, edited 1 time in total.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: PM, Aero Glass and Windows 10

Unread post by UCyborg » 2019-01-10, 13:20

Why can Chrome have an easy option to turn this stupid "feature" (custom title bar drawing) off, but FX based browsers can't?
Lootyhoof wrote:Pale Moon looks relatively native on Windows 10 because of the work that is done in custom drawing the window, rather than in spite of it. Without this there would be many visual glitches, and even the caption buttons themselves (minimise, maximise, close) wouldn't work properly.
Really? Some people have been resorting to removing Windows 10 GUID from the .exe's manifest because none of those CSS hacks that have been posted online actually work properly.

Caption buttons look and work just fine, even when the browser thinks it's running on Windows 8.1. And why wouldn't they?

Image

And the screen when it thinks it runs on Windows 10:

Image

Besides the frame height difference, the only inconsistency is caption text, but I'll get to that later.

I see no point in forcing the custom window decorations, especially if the end result looks like just stock Windows 10 minus transparency (if the user has Aero Glass installed) and the user has the default theme set in Pale Moon. Another comparison screenshots when the user is using a custom theme in Windows:

Image

Out of the box, user choices are ignored and the Windows 10 style frame is overlaid on top. Compared to...

Image

...which fixes the window frame, but due to the bad programming practices of making decisions based on the Windows version number, caption text still doesn't look right. If user's system settings declare they want the white text, Tahoma font, size 9, with a glow, then this is what they should get:

Image

Obviously, the caption text should also react accordingly to window's (in)active state. In the above scenario, it doesn't change at all.

yami_

Re: PM, Aero Glass and Windows 10

Unread post by yami_ » 2019-01-10, 16:13

UCyborg wrote:Why can Chrome have an easy option to turn this stupid "feature" (custom title bar drawing) off, but FX based browsers can't?
AFAIK disabling appmenu will also disable custom title bar drawing. Also if you are using hacks to modify DWM behavior do not be surprised when things do not work properly.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: PM, Aero Glass and Windows 10

Unread post by UCyborg » 2019-01-10, 20:49

I know about disabling appmenu. It does indeed render the frame and the caption the standard way. Thanks for pointing it out, someone might find it useful.

I merely wanted to point out the inconsistencies that can be observed on Windows 10 when you have the appmenu button enabled. Out-of-the box, one really gets the impression that the way the custom frame is drawn by default is just an attempt to emulate UWP apps' appearance. The possibility of user having high contrast mode enabled is also not taken into account. Windows 8.x and 10 also come with Aero Lite theme, which can be loaded without bypassing theme signature check. I was told that this one is selected by default under certain circumstances when performing upgrade install from Windows 7, probably if the user had Windows Classic or Windows 7 Basic set before upgrading.

BTW, since I mentioned the thing about drawing the caption text and how it looks depending on Windows version, applications that use the ribbon such as Paint and Wordpad, use DrawThemeTextEx to render caption text.

The restrictions in Windows don't help. On Windows 8, it's possible to have window captions in different colors on window frames on practically all applications that don't draw the entire frame on their own, by loading .msstyles with modified properties for caption color at two different places, which obviously also requires bypassing theme signature check. Something that was easily tweakable since at least Windows 95 until compositor became a thing.

Anyway, I digress.

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

Re: PM, Aero Glass and Windows 10

Unread post by Moonchild » 2019-01-11, 01:06

If you insist on hacking the operating system's style system, then you'll have to live with applications that do not use standard window frames looking differently.
Considering we use one theme for the OS range Win 7 through Win 10, which are wildly different in appearance and metrics, we are already catering to at least 4 totally different types of styling. Because of this going by Windows version indicators is the only way to reasonably do this -- yet you say it's "bad programming practice". I don't see how it would be done otherwise - it's not possible to query the effective style from the compositor.
A lot of work went into making this styling be as native as possible, but of course it will only take into account the normal, default, unhacked style system as-present in standard O.S. installs.

Keep in mind that the browser UI is drawn using XUL elements; this is not native to any O.S. but the advantage is that it is cross-platform (and fully customizable). The kind of response you're asking for would pretty much require Windows-only native frame elements, and that's just not how the browser works or is constructed.

Disabling the Pale Moon button/not drawing in the titlebar will switch to a native frame which works even if you've hacked the style system or do something custom with fonts and colors. So it will cater to that. I'm not sure what more you expect from us; it's impossible to respond to unsupported, unintended combinations of style elements.
"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
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: PM, Aero Glass and Windows 10

Unread post by UCyborg » 2019-01-11, 15:49

Understood. OK, I've said that thing about bad programming practice too quickly, mostly due to seeing in the past how version checks are used by certain programs.

yami_

Re: PM, Aero Glass and Windows 10

Unread post by yami_ » 2019-01-11, 18:20

Maybe you could create a theme that works like the default theme in Windows 8? This way no executable editing would be required and other users who want this behavior could also benefit from this.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: PM, Aero Glass and Windows 10

Unread post by UCyborg » 2019-02-26, 21:16

Yes, a theme like that would be nice. If I only knew how...the guy who wrote a bunch of CSS to alter appearance of Firefox Quantum only got to the point where the buttons appear correctly until you hover over them with a mouse.

Project's GitHub page
The part dealing with Aero on Win10

The new behavior on Win10 actually makes sense when you use a custom theme in Firefox as the buttons blend with the theme's background, at least as long as you don't use custom theme in Windows, which may have odd side effects on caption buttons. Edit: Those side effects don't apply to Pale Moon, but they do to newer Firefox versions, including Basilisk.

Another oddity I remember that was brought with one of the updates to Firefox, I don't remember the exact version, those buttons that use Windows theme's skin, eg. the ones in the dialog that asks whether you're sure you want to quit when you have multiple tabs open, the text on those buttons turns white when I hover over it with the mouse. When I switch back to default theme in Windows, they're fine. And I have no idea what part of the theme I'm normally using actually causes this! :wtf: This phenomenon doesn't occur in Pale Moon, but it was inherited by Basilisk. Either way, I carefully replaced the resources in the stock .msstyles on my own one-by-one, so should be 100% compatible with Windows build I'm running.

While it's still a workaround, it's not necessary to mod the .exe file, there's a registry setting that can be turned on for Windows to prefer external manifest instead of the one in the .exe.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: PM, Aero Glass and Windows 10

Unread post by UCyborg » 2019-04-22, 19:21

I found this...

File: widget/windows/nsWindow.cpp

Code: Select all

// Glass hit testing w/custom transparent margins
LRESULT dwmHitResult;
if (mCustomNonClient &&
    nsUXThemeData::CheckForCompositor() &&
    /* We don't do this for win10 glass with a custom titlebar,
     * in order to avoid the caption buttons breaking. */
    !(IsWin10OrLater() && HasGlass()) &&
    WinUtils::dwmDwmDefWindowProcPtr(mWnd, msg, wParam, lParam, &dwmHitResult)) {
  *aRetValue = dwmHitResult;
  return true;
}
That chunk of code completely disables stock caption buttons on Windows 10. It's hardcoded in xul.dll, so can't be fixed by CSS mods.

Goodydino
Keeps coming back
Keeps coming back
Posts: 820
Joined: 2017-10-10, 21:20

Re: PM, Aero Glass and Windows 10

Unread post by Goodydino » 2019-04-22, 21:12

Why do people want transparent or translucent toolbars or menus? The background shows through and makes the text really hard to read. It is much better if text is on an opaque background.

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

Re: PM, Aero Glass and Windows 10

Unread post by Moonchild » 2019-04-22, 22:25

UCyborg wrote:
2019-04-22, 19:21
That chunk of code completely disables stock caption buttons on Windows 10. It's hardcoded in xul.dll, so can't be fixed by CSS mods.
Not sure what your point is. It disables the caption button hit testing because, as already stated several times, we paint our own interface with a custom frame, as that is the only way we could properly do this with Windows 10 frame/accent color adoption.

In other words, if you insist you want to hack the style on Win 10 with a custom frame (not native window frame) you may have to get your hands dirty and build a custom binary.
"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