"Default zoom" feature request Topic is solved

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
Night Wing
Knows the dark side
Knows the dark side
Posts: 5174
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: "DEFAULT ZOOM" FEATURE REQUEST

Unread post by Night Wing » 2023-10-25, 02:06

Kris_88 wrote:
2023-10-24, 23:50
Am I forcing you? And you're not even the author of the topic. And my post wasn’t even under your post. Why are you angry, after all?
[/quote]

No. I am not angry. You are not forcing me to do any coding.

I am just pointing out to you what my strengths and weaknesses are and coding is beyond me. This is why I am agreeing with the OP's request.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: "Default zoom" feature request

Unread post by athenian200 » 2023-10-25, 03:35

That said, you actually don't have to run any code at all if you know how to deal with preferences...

You can just go to about:config and change the value of:

browser.content.full-zoom

To whatever you want it to be. I mean, what's the real difference between going into about:config and changing that value directly, versus typing the zoom percentage you want into a box in the GUI somewhere? If it were implemented, you'd just be typing a zoom percentage into a box (or selecting it from a menu) instead of typing a number next to the preference.

Just doesn't seem like it's that much easier to click through menus to find a default zoom GUI and select a percentage from a menu compared with typing a value into a box in about:config...

EDIT: This post is incorrect. I didn't know what a "content preference" was when I wrote it, and assumed the instructions Kris gave were unnecessarily convoluted. Apparently you can't change it like a normal preference at all.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
suzyne
Lunatic
Lunatic
Posts: 364
Joined: 2023-06-28, 22:43
Location: Australia

Re: "Default zoom" feature request

Unread post by suzyne » 2023-10-25, 04:03

athenian200 wrote:
2023-10-25, 03:35
You can just go to about:config and change the value of:

browser.content.full-zoom
Is that the correct option? I went to try it out, and it wasn't available.

Image
Laptop 1: Windows 10 64-bit, i7 @ 2.80GHz, 16GB, NVIDIA GeForce MX450.
Laptop 2: Windows 10 32-bit, Atom Z3735F @ 1.33GHz, 2GB, Intel HD Graphics.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: "Default zoom" feature request

Unread post by athenian200 » 2023-10-25, 04:26

suzyne wrote:
2023-10-25, 04:03
Is that the correct option? I went to try it out, and it wasn't available.

Image
Honestly, I just assumed it was since someone else mentioned it in a post, but I just went and tried setting it, and it apparently does absolutely nothing. Maybe it's a setting for a specific extension or something that was mistakenly thought to be native?

The only way I was able to make everything bigger by default was by using the old layout.css.devPixelsPerPx trick, but that increases the size of all UI elements. Meaning that it isn't much different than just using display scaling within Windows or lowering your monitor resolution.

EDIT: There is actually another way. You can set browser.zoom.siteSpecific to false, and then restart the browser. After that, your zoom settings will apply to every site you visit rather than having different settings for different websites.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-25, 07:26

browser.content.full-zoom
It is "Content preference", not "Preference".

This is another service in the browser that stores site-specific settings. It is not available via about:config.
Last edited by Kris_88 on 2023-10-25, 07:47, edited 1 time in total.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: "Default zoom" feature request

Unread post by athenian200 » 2023-10-25, 09:33

Kris_88 wrote:
2023-10-25, 07:26
browser.content.full-zoom
It is "Content preference", not "Preference".

This is another service in the browser that stores site-specific settings. It is not available via about:config.
So, you're telling me we actually have stuff in the browser that looks and acts a lot like the preferences we can set in about:config, but can only be controlled through convoluted methods like injecting JavaScript via the scratchbox like some kind of hacker or script kiddie, and/or writing an extension that effectively does the same thing?

I'm gonna have to agree with Night Wing for once, on at least one point... that this is definitely too complicated for an end user. I write C++ and have added features to UXP. Even I don't find the difference between a normal preference and a content preference to be a very intuitive distinction. And if I can compile Pale Moon and I don't find this intuitive, I can only imagine what an end user trying to understand this would think. My tone probably sounds a little negative here, but I should emphasize that my annoyance is at how these "content preferences" I'm just learning about work, rather than at you.

Still, I do think that since the extensions have already been written, they are probably the best way to deal with all this for the average user. Even I probably would be forced to use an extension for that, and I am the kind of person that usually likes to think of myself as above using extensions because I know how to manipulate preferences and browser behavior more directly. :/
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-25, 09:52

athenian200 wrote:
2023-10-25, 09:33
So, you're telling me we actually have stuff in the browser that looks and acts a lot like the preferences we can set in about:config, but can only be controlled through convoluted methods like injecting JavaScript via the scratchbox like some kind of hacker or script kiddie, and/or writing an extension that effectively does the same thing?
Yes, we have. They are stored in the content-prefs.sqlite in the user's profile folder.
And, yes, there is no user interface (such as about:config) to manipulate some of these preferences.

https://repo.palemoon.org/MoonchildProd ... rvice2.idl
* Content Preferences
*
* Content preferences allow the application to associate arbitrary data, or
* "preferences", with specific domains, or web "content". Specifically, a
* content preference is a structure with three values: a domain with which the
* preference is associated, a name that identifies the preference within its
* domain, and a value. (See nsIContentPref below.)
*
* For example, if you want to remember the user's preference for a certain zoom
* level on www.mozilla.org pages, you might store a preference whose domain is
* "www.mozilla.org", whose name is "zoomLevel", and whose value is the numeric
* zoom level.
*
* A preference need not have a domain, and in that case the preference is
* called a "global" preference. This interface doesn't impart any special
* significance to global preferences; they're simply name-value pairs that
* aren't associated with any particular domain. As a consumer of this
* interface, you might choose to let a global preference override all non-
* global preferences of the same name, for example, for whatever definition of
* "override" is appropriate for your use case.
*

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-25, 10:19

athenian200 wrote:
2023-10-25, 09:33
Still, I do think that since the extensions have already been written, they are probably the best way to deal with all this for the average user. Even I probably would be forced to use an extension for that, and I am the kind of person that usually likes to think of myself as above using extensions because I know how to manipulate preferences and browser behavior more directly. :/
The question is not how to manipulate this for an ordinary user. The fundamental question is whether such native customization should be brought into the user interface. Given that the default zoom is obviously a useful user preference, and given that the browser already has all the necessary mechanisms, it would be logical to make such a setting directly in the browser, making it native, rather than using an extension. This is an elementary requirement of "completeness".

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2411
Joined: 2012-08-19, 20:32

Re: "Default zoom" feature request

Unread post by back2themoon » 2023-10-25, 10:30

Moonchild wrote:
2023-10-25, 00:31
Yes, we have a way to set the global zoom (I assume NoSquint uses this, in fact) but if we implement this then it would fall short of the added functionality that users would want. Something that is already filled by NoSquint.
I think NoSquint disables the browser's zoom mechanism and uses its own. This is indicated in a prompt during NoSquint installation. Not sure if this prompt appears in the Pale Moon NoSquint fork though. The browser's zoom method is restored when you uninstall NS. I don't know the inner workings of either, so I don't know how much NS does on its own. I think using both NS and Zoom Label at the same time might even be incompatible.

If I understand correctly:

a) Pale Moon already includes a way to change and store the GLOBAL (Full/TextOnly) zoom setting. I am leaving PER-SITE settings out of this, due to added complexity.

b) The Zoom Label extension simply exposes this GLOBAL setting, adding some intuitive controls for it.

If the above are correct, I don't think it's unreasonable to add the Zoom Label functionality (or similar) to the browser, since we are talking about UI/ease of use improvements alone and certainly not to change how the browser deals with zoom settings. I also don't think this is strictly for people with eyesight problems, but that's another story (bad web design, variety of display devices etc.). I don't know how complex it might be to add this functionality though. If it requires way too much work, then sticking to available extensions is perfectly fine.

NoSquint is an entirely different beast than Zoom Label and of course it belongs to Pale Moon's rich extension realm. It does much more than simply changing the global zoom, although I guess it can be used for that alone.

Kris_88 wrote:
2023-10-25, 10:19
Given that the default zoom is obviously a useful user preference, and given that the browser already has all the necessary mechanisms, it would be logical to make such a setting directly in the browser, making it native, rather than using an extension.
Agreed 100%.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: "Default zoom" feature request

Unread post by athenian200 » 2023-10-25, 10:40

Kris_88 wrote:
2023-10-25, 10:19
The question is not how to manipulate this for an ordinary user. The fundamental question is whether such native customization should be brought into the user interface. Given that the default zoom is obviously a useful user preference, and given that the browser already has all the necessary mechanisms, it would be logical to make such a setting directly in the browser, making it native, rather than using an extension. This is an elementary requirement of "completeness".
Well, I just assumed when you said "user interface" that you meant there was no GUI for it, but if we're defining user interface this broadly, I can certainly agree that there should at least be a "real" preference for this that can be set via about:config.

I think it's reasonable to avoid adding new features to the GUI, because doing that often involves creating new translation strings for every language we support, and writing a bunch of XUL boilerplate that then has to be maintained. But in general, I think if the browser supports a feature, it's reasonable for users to at least expect that feature to be exposed via about:config rather than being told that it's an extension-only feature closed to normal users, and that one must either learn to write extensions or learn enough JavaScript to hack the browser via the scratchpad to use it... especially if we're talking about manipulating a numerical value that is basically just a percentage and not anything more complicated.

The one caveat here is this... since Mozilla has always had it this way, if we were to change this to use a "real" preference rather than a content preference, it's possible it would break all the existing extensions, and all those accessibility extensions not working properly would definitely cause issues.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-25, 10:44

back2themoon wrote:
2023-10-25, 10:30
a) Pale Moon already includes a way to change and store the GLOBAL (Full/TextOnly) zoom setting.
Exactly
back2themoon wrote:
2023-10-25, 10:30
b) Zoom Label extension simply exposes this GLOBAL setting, adding some intuitive controls for it.
No. Zoom Label shows the current value. The browser itself decides what starting value should be applied when opening a website page. This is the default value of 100% or a previously saved site-specific value. These initial "100%" may have a different value, but there is no user interface to conveniently change it.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-25, 10:52

athenian200 wrote:
2023-10-25, 10:40
Well, I just assumed when you said "user interface" that you meant there was no GUI for it,
Yes, you understood absolutely correctly. I believe that a setting needs to be made in the GUI. I didn't mean the setting in about:config.

EDIT:

Somewhere like Tools->Preferences->Content.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2411
Joined: 2012-08-19, 20:32

Re: "Default zoom" feature request

Unread post by back2themoon » 2023-10-25, 11:09

Kris_88 wrote:
2023-10-25, 10:44
No. Zoom Label shows the current value. The browser itself decides what starting value should be applied when opening a website page. This is the default value of 100% or a previously saved site-specific value. These initial "100%" may have a different value, but there is no user interface to conveniently change it.
Oh, so you are saying that Zoom Level exposes the PER-SITE zoom level (which Pale Moon also stores), and not the Global Zoom level, which would affect all websites?

I can see some confusion and implementation complexities there... The initial request was for a "default" zoom level toggle/indicator, which is NOT a per-site setting. It's a Global setting which does not change on a per-site basis.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-25, 11:20

back2themoon wrote:
2023-10-25, 11:09
Oh, so you are saying that Zoom Level exposes the PER-SITE zoom level (which Pale Moon also stores), and not the Global Zoom level, which would affect all websites?
Zoom Label does not change the logic of the browser. This logic is determined by the browser.zoom.siteSpecific preference and stored site-specific values.
back2themoon wrote:
2023-10-25, 11:09
The initial request was for a "default" zoom level toggle/indicator, which is NOT a per-site setting. It's a Global setting which does not change on a per-site basis.
As far as I understand, the initial request was about the default zoom value for new sites for which the user has not yet set a site-specific zoom. It is this default value that I talk about in all my posts in this topic.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-25, 12:02

athenian200 wrote:
2023-10-25, 10:40
I think it's reasonable to avoid adding new features to the GUI, because doing that often involves creating new translation strings for every language we support
Alternatively, we can consider this setting to be an "advanced" and ask Moonchild add it to the "Pale Moon Commander" extension. ;)
https://addons.palemoon.org/addon/pm-commander/

User avatar
suzyne
Lunatic
Lunatic
Posts: 364
Joined: 2023-06-28, 22:43
Location: Australia

Re: "Default zoom" feature request

Unread post by suzyne » 2023-10-26, 00:08

Having read the thread since my last comment, I just want to say that my attitude to extensions has changed over time. Extensions are great, but NoSquint feels excessive for my use case. I have it setting the zoom for new pages, and other than that, all the other abilities are unused.

When I began with Pale Moon, I couldn't have too many extensions, installing many from the supported add-ons list and then more from other sources, but now I am trying to slim down my extensions list. NoSquint is one of the prime candidates to go, and I am ready to use this Scratchpad thing to resolve my screen preferences.

But conversely, given that a Default Zoom setting is a not uncommon feature to be found in browser settings and preferences, I wouldn't categorise it as an edge case. Ultimately, since I am not the persons who would do the work, (and I don't really have a sense of what is involved) I won't mention again (after this!) how nice a Default Zoom in the standard UI would be in the future.
Laptop 1: Windows 10 64-bit, i7 @ 2.80GHz, 16GB, NVIDIA GeForce MX450.
Laptop 2: Windows 10 32-bit, Atom Z3735F @ 1.33GHz, 2GB, Intel HD Graphics.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-10-26, 04:53

In fact, it is not even necessary to use a content preference mechanism. The default scale of "1" is only present in a few places. It can indeed be read from ordinary preferences. In short, the problem is not complexity, but desire...

https://repo.palemoon.org/MoonchildProd ... ullZoom.js

Code: Select all

292  	        ZoomManager.setZoomForBrowser(browser, value === undefined ? 1 : value);
348  	        ZoomManager.setZoomForBrowser(aBrowser, value === undefined ? 1 : value);

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4984
Joined: 2015-12-09, 15:45

Re: "Default zoom" feature request

Unread post by moonbat » 2023-10-26, 05:35

Kris_88 wrote:
2023-10-26, 04:53
the problem is not complexity, but desire...
Maintaining compatibility more like it.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
allseeingeye819
New to the forum
New to the forum
Posts: 2
Joined: 2023-10-24, 10:58

Re: "Default zoom" feature request

Unread post by allseeingeye819 » 2023-10-26, 18:50

I tried the extension "NoSquint" in conjuction with "Zoom Label" and it works like a charm!!!
I really appreciated you taking the time to answer my question...

THANK U SO MUCH GUYS

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: "Default zoom" feature request

Unread post by Kris_88 » 2023-11-13, 19:34

I have added default zoom and GUI zoom settings to the ZoomLabel add-on.
https://addons.palemoon.org/addon/zoom-label/