Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44 closed enhancement (fixed)

Window gadgets

Reported by: Mikhail Malyshev Owned by: Thore Böckelmann
Priority: normal Milestone: 3.9-2014R2
Component: Winborder.mui Version: 3.9-2014R1
Severity: minor Keywords:
Cc: OS Platform: AmigaOS3
Blocked By: Blocking:
Release Notes:

Description

Problem

MUI window gadgets (Zoom, Snap. Menu, MUI…) are no longer patched properly by Visual Prefs.

Analysis

Cosmetic problem

Enhancement recommendation

If not possible to find a simple solution, maybe have an ENV variable, so that the gadgets are rendered using old code (for whom it is required)

Pictures show old MUI 3.8/3.9 and NEW MUI 3.9

Attachments (13)

MUI-NEW-GAD.PNG (10.2 KB) - added by Mikhail Malyshev 6 years ago.
MUI_OLD.PNG (5.5 KB) - added by Mikhail Malyshev 6 years ago.
MUI39N-window-gad.png (12.9 KB) - added by Mikhail Malyshev 6 years ago.
Spacing problems
MUI39N-2.PNG (4.4 KB) - added by Mikhail Malyshev 6 years ago.
MUI39N-2-ZOOMED.png (6.7 KB) - added by Mikhail Malyshev 6 years ago.
zoomed x4 version
winborder-1.png (4.5 KB) - added by Mikhail Malyshev 6 years ago.
winborder-2.png (5.0 KB) - added by Mikhail Malyshev 6 years ago.
winborder-3.png (174.2 KB) - added by Mikhail Malyshev 6 years ago.
winborder-3.2.png (61.3 KB) - added by Mikhail Malyshev 6 years ago.
mui39-window2.png (43.0 KB) - added by Mikhail Malyshev 6 years ago.
mui39b-future-gadgets.png (59.9 KB) - added by Mikhail Malyshev 6 years ago.
MUI39-WINGAD-PERFECT.PNG (15.9 KB) - added by Mikhail Malyshev 6 years ago.
MUI39-WINGAD-PERFECT2.PNG (15.7 KB) - added by Mikhail Malyshev 6 years ago.

Download all attachments as: .zip

Change History (45)

comment:1 Changed 51 years ago by Mikhail Malyshev

Status: pendingnew

comment:2 Changed 51 years ago by Mikhail Malyshev

Status: pendingnew

comment:3 Changed 51 years ago by Mikhail Malyshev

Status: pendingnew

Changed 6 years ago by Mikhail Malyshev

Attachment: MUI-NEW-GAD.PNG added

Changed 6 years ago by Mikhail Malyshev

Attachment: MUI_OLD.PNG added

comment:1 Changed 6 years ago by Thore Böckelmann

Milestone: MUI 3.9-2014R2
Priority: undecidednormal
Resolution: fixed
Status: newclosed

The next nightly build should fix this issue partly. The "jump to screen" button is the big exception, because VisualPrefs doesn't know this button and hence cannot patch it.

comment:2 Changed 6 years ago by Mikhail Malyshev

Regarding nightly builds… Can we have the debug less version ?
Current AmigaOS3 archives are both with 10MB debug files.

comment:3 Changed 6 years ago by Jens Maus

No, debug is debug an nothing else. We need all debugging symbols there. And again you are mixing up things. This ticket is not about nightly builds, its about VisualPrefs. So please next time open another new ticket if you find that you want to have smaller debug archives.

comment:4 Changed 6 years ago by Mikhail Malyshev

Resolution: fixed
Status: closedreopened

Fixed partially in Nightly.
Spacing is set wrongly for simple vector XEN style gadgets
Also the screenjump gadget is currently a Dopus padlock,
maybe it is better to use the next image TBRFRAMEIMAGE
it will look empty in vector modes and can be anything in PXL GFX modes
since it is unused at the moment.

Changed 6 years ago by Mikhail Malyshev

Attachment: MUI39N-window-gad.png added

Spacing problems

comment:5 Changed 6 years ago by Thore Böckelmann

Status: reopenedpending

MUI sets a fixed size for the images and gadgets. If a certain patch does not obey this fixed size and replaces the images by something smaller then it is the task of the patch to adjust the size and the position of the gadgets, too. VisualPrefs clearly fails to do this. Sorry, but it is not MUI's task to help bad patches doing their work correctly.

Maybe it is possible to obtain the size of the image right after creating the object to adjust the gadget's size. I will try this but I don't promise anything.

Furthermore I stated above already that the "jump to screen" button cannot be patches, because VisualPrefs doesn't know it. Either accept this fact or don't use this button. I used the padlock image just to show anything. I will revert that change again.

comment:6 Changed 6 years ago by Mikhail Malyshev

Older MUI 3.8 and 3.9 had no problems with the size of the gadgets.
3.9 (2005) obviously had the screen button that could not be changed, and yes, it can be avoided since the function is in the popup menu anyway.

VisualPrefs has a reserved empty image, that can be used for a gadget that has no appropriate image as a fall back. And if you read the VP DEV docs they have gadget size parameters available. Also having fixed size gadgets is wrong, and this problem was slowly corrected since OS 2.1, and I believe in OS4 all gadgets have variable size setting.

Besides we are not inventing anything new, it used to work fine before, so it should not be a BIG problem to make it work again.

comment:7 Changed 6 years ago by Thore Böckelmann

In 3634:

  • Winborder.c: don't let VisualPrefs replace the "jump to screen" button image because it doesn't know this image at all. This refs #44.

comment:8 Changed 6 years ago by Thore Böckelmann

In 3635:

  • Winborder.c: ask the created image object for the image dimensions in case these differ from the desired dimensions. This refs #44.

Changed 6 years ago by Mikhail Malyshev

Attachment: MUI39N-2.PNG added

Changed 6 years ago by Mikhail Malyshev

Attachment: MUI39N-2-ZOOMED.png added

zoomed x4 version

comment:9 Changed 6 years ago by Mikhail Malyshev

Almost there, but there is a 1 pxl miscalculation somewhere

.zoomed x4 version

Last edited 6 years ago by Mikhail Malyshev (previous) (diff)

comment:10 Changed 6 years ago by Thore Böckelmann

Owner: set to Thore Böckelmann
Status: newassigned

Please try again with the next nightly build. I added a few changes for the titlebar images in case VisualPrefs is active.

Changed 6 years ago by Mikhail Malyshev

Attachment: winborder-1.png added

Changed 6 years ago by Mikhail Malyshev

Attachment: winborder-2.png added

Changed 6 years ago by Mikhail Malyshev

Attachment: winborder-3.png added

Changed 6 years ago by Mikhail Malyshev

Attachment: winborder-3.2.png added

comment:11 Changed 6 years ago by Mikhail Malyshev




Previous version looked better (only 1 pxl of line)
Here we get an empty gadget
and the screen jump gadget really pops out of place if used,
actually it looks as if it's position is static

But the iconify gadget is correct!

comment:12 Changed 6 years ago by Thore Böckelmann

Resolution: fixed
Status: assignedclosed

In 3742:

  • Winborder.c: derive the "winborderimage" class from "tbiclass" instead of "imageclass" if it is available. This makes it possible to add the yet unsupported screen jump image in a consistent way. This finally closes #44.

Changed 6 years ago by Mikhail Malyshev

Attachment: mui39-window2.png added

comment:13 Changed 6 years ago by Mikhail Malyshev


Still open ;-)

Enforcer hit I guess is fixed….

The 'ghost' leftmost gadget appears when any additional gadget is enabled (it does not do anything).
Also you can see that it is copied over the iconify gadget (backfill colour of gradient is wrong)

comment:14 Changed 6 years ago by Mikhail Malyshev

Resolution: fixed
Status: closedreopened

comment:15 Changed 6 years ago by Thore Böckelmann

Status: reopenedpending

Did you check already with the latest nightly build (2014-07-26)? For me there is no additional gadget left of the popup gadget, no matter which setting I use for VisualPrefs.

Again, if you reopen a ticket then you must provide some new information. Otherwise we will close it again immediately.

comment:16 Changed 6 years ago by Mikhail Malyshev

Latest build 2014-07-26, same story

comment:17 Changed 6 years ago by Thore Böckelmann

In 3797:

  • Winborder.c: added some debug output to the window title gadget creation. This refs #44.

comment:18 Changed 6 years ago by Thore Böckelmann

Status: newpending

Try again with the debug version of the next nightly build and creata a WINDOW debug log with it.

comment:19 Changed 6 years ago by Thore Böckelmann

In 3810:

  • Winborder.c: use TBFRAMEIMAGE as basis for the screen jump image in case VisualPrefs is running. This refs #44.

comment:20 Changed 6 years ago by Mikhail Malyshev

Looks like it is working now!
I am more or less happy with this now.
Really further improvement requires update to VP.

However there are two small improvements/bugs potentially to be ironed out so.

  1. For screenfonts below 13 (size 8-12) the window gadget width is a bit small for the current screenjump gadget image (it can be made a bit smaller by making the 3 small squares smaller by 1 pxl each) ideally it should be a vector image and size itself to the size of the window gadget.
  1. When selecting the FUTURE look GUI design the screenjump gadget does not get the future look frame and remains flat.

But in reality, if it is not working for someone, the screenjump can be disabled.

comment:21 in reply to:  20 Changed 6 years ago by Thore Böckelmann

Replying to Michael:

  1. For screenfonts below 13 (size 8-12) the window gadget width is a bit small for the current screenjump gadget image (it can be made a bit smaller by making the 3 small squares smaller by 1 pxl each) ideally it should be a vector image and size itself to the size of the window gadget.

It is some kind of vector image drawing itself from the center of the area with a width of 15 pixels. MUI itself assumes a width of 23 pixels while VisualPrefs uses 25 pixels. There is even a macro to calculate the position of a gadget within the frame which uses this 25 pixel width. As such there is plenty of space.

  1. When selecting the FUTURE look GUI design the screenjump gadget does not get the future look frame and remains flat.

If VisualPrefs patches anything it is the task of VisualPrefs to make sure that everything is drawn correctl. If it fails to do this there is nothing I can do about that. However, I did another change yesterday which might fix this. Just try today's nightly build.

comment:22 Changed 6 years ago by Mikhail Malyshev

The gadget width can be smaller, see top most pic above.
For example with XEN.11 font and more or less square aspect ratio the gadget width is only 18 pixels (only 16 pixels left for the image) and ideally only 14 available for an image so that it does not touch the borders.
With tiny fonts the window borders can get much smaller.
So, can MUI detect the allowed width before calculating the image ?
Currently, I guess it is fixed width, so for large fonts it will be a bit small.

Changed 6 years ago by Mikhail Malyshev

Attachment: mui39b-future-gadgets.png added

comment:23 Changed 6 years ago by Mikhail Malyshev


The future mode is as is. And IMHO this can probably be fixed only with VP update.
But the max width of the gadget image needs to be dynamic.
Smaller for small gadgets, and a bit larger for ultra res screens

comment:24 Changed 6 years ago by Thore Böckelmann

Resolution: fixed
Status: newclosed

I told you several times by now that the screen jump image is not directly supported by VisualPrefs. Any inconsistency caused by this fact cannot be worked around in each and every possible situation. tbimage.class provides itself provides a standard width value and a macro to calculate the gadget position on basis on this width value. If VisualPrefs fails to obey its own rules then there is nothing that any application can do about this failure. Even if the imagery would be drawn smaller then the frame as shown in your latest screenshot would still be missing. Face it, VisualPrefs does not support this type of image/gadget and no matter how hard ones tries there will always be a way to make the attempt fail. I will not do any further work regarding this ticket. As you said yourself already: if someone doesn't like the way the image looks it can be disabled. Just follow your own adivse…

comment:25 Changed 6 years ago by Mikhail Malyshev

Agreed on all, but the size. In standard mode the gadgets are drawn ok, but the sizes are not regulated. Will get some images done to explain why.

Changed 6 years ago by Mikhail Malyshev

Attachment: MUI39-WINGAD-PERFECT.PNG added

Changed 6 years ago by Mikhail Malyshev

Attachment: MUI39-WINGAD-PERFECT2.PNG added

comment:26 Changed 6 years ago by Mikhail Malyshev


Lets hope this pictures save 1000 words…

The easiest solution is to shrink the default image width.
The ideal solution, is to make it calculate, so it looks better on larger screens.

comment:27 Changed 6 years ago by Thore Böckelmann

Convince Massimo Tantignone to enhance VisualPrefs. MUI is definitely the wrong place for this kind of enhancements.

comment:28 Changed 6 years ago by Mikhail Malyshev

He promised, but no estimates as to when.
Anyway, as I have said before, I am happy with what we got at the moment, it can be improved a bit more, but not big issue, other things are more important now.

comment:29 Changed 6 years ago by Thore Böckelmann

Milestone: MUI 3.9-2014R23.9-2014R2

Milestone renamed

Note: See TracTickets for help on using tickets.