General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Need help displaying messages on the status bar
Posted by: foliator
Date: August 10, 2017 02:18AM

I've just created a simple macro that toggles the minimum font size preference between 0 and 19. It's for those many sites with tiny fonts, and is easier than having to constantly zoom up and down.

MinimumFont{
togglepref(INT, "font.minimum-size.x-cyrillic", 19, 0);
togglepref(INT, "font.minimum-size.x-unicode", 19, 0);
togglepref(INT, "font.minimum-size.x-western", 19, 0);
}

It works great, but is there a way to display a message indicating which of the two values is in use after running the macro? I don't know how to place one on the status bar, which is where I'd like it to appear. After studying other macros that use the status bar, including main.kmm, I'm totally confused. :s

---
Gerry

Options: ReplyQuote
Re: Need help displaying messages on the status bar
Posted by: siria
Date: August 10, 2017 03:41AM

Nice to see someone playing with macros, happens hardly ever smiling smiley
statusbar is easy, all it needs is a bit plain text. For this macro would suggest:
$_x=getpref(INT,"font.minimum-size.x-unicode");
statusbar("min font size: ".$_x);


Yes too tiny fonts are a pain! My own minimum size is permanently at 14 with font Verdana, works quite well. No idea why the KM-default is zero, or what this could be good for??

In general would first look here:
http://kmeleonbrowser.org/wiki/index.php?id=MacroLanguage2
There are a few more related pages, James collected the most important ones into a macro called "Local Docs", which contains almost the same but stores them as local files, find it sometimes handier and quicker.
Of course am also taking older macros as example all the time, but frankly prefer either the expert ones contained in KM out-of-box or my own more recent ones, considering lots of other macros in the archives and forum are far more complicated as necessary, making even the easiest things confusing. Just due to lack of real understanding, so better not ever changed a jota, only copied from another old macro which itself was also copied from another which itself was also copied from another... ;-) Then again, a few parts in the real expert macros (main.kmm) are sometimes just TOO expert and above my head too :cool:

PS:
if you want to make sure your 3 prefs really get the same value, an easy way would be:
$_x=togglepref(....
setpref(... $_x)
setpref(... $_x)



Edited 2 time(s). Last edit at 08/10/2017 03:49AM by siria.

Options: ReplyQuote
Re: Need help displaying messages on the status bar
Posted by: foliator
Date: August 10, 2017 02:05PM

Quote
siria
Nice to see someone playing with macros, happens hardly ever smiling smiley
statusbar is easy, all it needs is a bit plain text. For this macro would suggest:
$_x=getpref(INT,"font.minimum-size.x-unicode");
statusbar("min font size: ".$_x);

Thanks, siria. It's easier than I thought!

Quote
siria
Yes too tiny fonts are a pain! My own minimum size is permanently at 14 with font Verdana, works quite well. No idea why the KM-default is zero, or what this could be good for??

My problem is caused by lifelong poor eyesight, which has worstened with old age, plus my computer's high-res screen, which makes fonts smaller than average. My default font is 20, and the minimum of 19 is just about right for the problem websites. That zero default simply means don't set a minimum at all. That works OK with some of the well-designed websites, but there are less and less of them these days.

The other problem with today's websites is the increasing use of gray text on a white background. I had to add a line to userContent.css to force body fonts to black on white so I can read them.

Quote
siria
... a few parts in the real expert macros (main.kmm) are sometimes just TOO expert and above my head too :cool:

Yes, looking through that nearly gives me a headache (and eye strain)! :s

PS:
if you want to make sure your 3 prefs really get the same value, an easy way would be:
$_x=togglepref(....
setpref(... $_x)
setpref(... $_x)

Going to try that shortly. Thanks again! smiling smiley

---
Gerry



Edited 1 time(s). Last edit at 08/10/2017 03:11PM by foliator.

Options: ReplyQuote
Re: Need help displaying messages on the status bar
Posted by: JohnHell
Date: August 10, 2017 04:32PM

Quote
siria
Yes too tiny fonts are a pain! My own minimum size is permanently at 14 with font Verdana, works quite well. No idea why the KM-default is zero, or what this could be good for??

Because 0 means default font size, or in other words, 1em, and more to earth words, 12pt or 16px.

But 1em is different for each font. Verdana, in fact, has an em higher than other fonts, that is the reason it looks bigger and clearer.

Quote
foliator
The other problem with today's websites is the increasing use of gray text on a white background. I had to add a line to userContent.css to force body fonts to black on white so I can read them.

Nice to see I'm not the only one. Damn grey trend.

Join the rebellion!!!! http://contrastrebellion.com/ (No one would care, but spread the word)



Edited 1 time(s). Last edit at 08/10/2017 04:36PM by JohnHell.

Options: ReplyQuote
Re: Need help displaying messages on the status bar
Posted by: foliator
Date: August 10, 2017 04:51PM

Quote
JohnHell
Nice to see I'm not the only one. Damn grey trend.

Join the rebellion!!!! http://contrastrebellion.com/ (No one would care, but spread the word)

Have a look at this web designer's site for a good example of hypocrisy; they claim to design accessible websites:

http://ecru.co.uk/

I sent the webmaster the following comment by e-mail:
Quote

Your own website uses gray text against a white background, which is very hard to read with my age-related visual impairment. In fact, even a young person with good vision would find it difficult. Is this what you mean by "accessibility", or is it some kind of joke?

:mad:

---
Gerry

Options: ReplyQuote


K-Meleon forum is powered by Phorum.