On Mon, 10 Nov 2008 15:08:43 -0300 Jorge Arellano Cid <jcid@dillo.org> wrote:
[...] The first is to fix an over-sight in the following post/patch posted to this mailing list: http://article.gmane.org/gmane.comp.web.dillo.devel/6248
The above patch does not take into consideration font size, so the result can be microscopic/unreadable fonts. I've added the code to scale the font in the same way as you scale other fonts in dillo. Though I've read enough of the dillo docs and code to grasp the basics of formatting, I'm unsure if my formatting of the continuation (split line) is "correct" according to your standards.
There are other places in the dillo UI where font handling is still incorrect and can result in unreadable fonts. Some of this is the fault of fltk, since as far as I know there is no ~/.gtkrc equivalent to set defaults for the tool kit. With luck, I'll find and fix them.
This raises an interesting issue.
It may be necessary to add "ui_font_factor" to dillorc.
With the patch "as is" things get broken here. The popup menus get incomplete titles.
By this I assume you mean the text with the new/larger font size in the title/label on the popup menus does not fit within the provided space? I saw this behavior as well. The fact things work without the patch is really a matter of luck, and not a matter of correctness. The correct way to deal with it is to always calculate the size of the text string (with the specified font), and adjust the size of the label/title accordingly. I remember reading in the fltk docs about a member function to calculate X,Y size but since dillo is my first adventure into fltk, I simply cannot recall the function name. --It's one of those "I know I saw it... but where the heck did I see it?" type of things. ;-)
Looking at the result, I realized my personal preference is to have smaller fonts in the UI, than in rendered pages. This led me to the "ui_font_factor" solution.
CVS has now a similar patch that doesn't scale the font (submitted by corvid some time ago).
It'd be good to have a patch that takes all the UI elements into account. Unfortunately, a patch that scales UI fonts may also need to scale the UI panel and this could take some effort.
Scaling the UI font without scaling the UI panel may be easier, and also serve the purpose.
Keeping the UI usable/readable across a multitude of systems and configurations is a different problem than keeping the displayed web pages usable/readable. It's best to address each problem individually, rather than lumping them together. Though it would be a serious change, and require a lot of patching, I think the best solution is to have a two pronged approach: 1.) Font Factor (scaling) 2.) Font Size If only Font_Size is stated, it would be used verbatim. If only Font_Factor is stated, it would scale the font. if both were stated, Font_Factor would take precedence. This would give you prefs for: vw_font_name vw_font_size vw_font_factor ui_font_name ui_font_size ui_font_factor Ummm... with all due respect, I think the currently used "fontname" in the prefs is against the coding conventions stated on the dillo site. Of course, it really doesn't matter to a compiler, but if I'm going to dig into augmenting this code, I need to know the "right" (TM)(C)(R) way to fix it. :-)
Unfortunately, I screwed up pasting my email address in the "submitter" section due to the fact that dillo doesn't actually copy selected text in a form (i.e. with the select/paste of the plain old X Window System). If you want to correct the submitter on the bug to my email address, it would be appreciated. There was no way I could correct it myself.
On all popup menus in dillo, you have a non-typical and non-functional "label" (or better said "title") on the displayed popup menu. This was my first adventute into fltk, but according to the fltk2 docs, if you set the "label" of the popup menu to NULL, the "label" will not be shown. You can do it one of two ways, (1) setting the lable to NULL in the instantiation of the class or (2) using the ->label() member function to set the label to NULL. I opted for the former because it's more clean than the latter.
I like those menu title labels in place. They even help me! They also help newcomers to grasp Dillo's UI.
Does anybody else feel like those labels are better out? (if YES, a preference may be added)
Having an option might work, but I'm typically against having knobs just for the sake of having knobs. Keeping things simple and usable is far more important, and this includes keeping the code simple. I tend to follow the path of least surprise. :-) Since I cannot think of another application which has a label/title on Right-Click popup menus, I think having them would surprise new users more than not having them. By having label/title bars on menus, you're treating them like windows, and hence, the behavior is non-typical, inconsistent and unexpected. As for *my* personal opinion, I hate label/title bars since (to me) they serve no purpose. I'm actually running the cwm window manager so even windows don't waste space on unnecessary, non-functional title bars.
Though there were "Accelerator" key bindings in the labels (such as "&PAGE OPTIONS" to get enable win32 meun-ish "<ALT>-P" activation), they don't actually work since the popup menu type ("POPUP123") means they are completely hidden until activated by the mouse buttons.
There's a FLTK STR on this.
Bummer! It would be sweet if we could activate the popups throught he keyboard. Hopefully this will get fixed.
There is still a popup menu placement issue (annoyance) with the Bug Meter when running dillo in full screen (or to the bottom edge of your screen) but it seems to be caused by the fltk "remember last selected" option. It does not properly realize the bottom edge of the screen/window, so some popup menu options are off-screen and you need a mouse-wheel movement to access them.
This may be a bug in FLTK, but I'm not sure.
BTW, it's good to see new developers around. Please check a bit the latest activity in dillo-dev and you'll find other FLTK/UI issues waiting for a patch.
Thanks. I'll try to read the archives a bit more. -- J.C. Roberts