Git Product home page Git Product logo

thebar's People

Contributors

alranieri avatar deadwood2 avatar jens-maus avatar mattrust avatar pbobbenb avatar tboeckel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

thebar's Issues

Call to super class method in HandleEvent

Hello,

I'm posting this issues as I came across incompatibility in AROS when using TheButton. In essence, one click on a button, causes two events to be fired, because first Area class event handler is invoked directly via event handler node registration on Area class and then the same event handler is called via DoSuperMethodA in TheButton class event handler. Effect is button being pressed and then unpressed on AROS. Looking at MUI documentation about MUIM_HandleEvent it says:

"Do NOT pass this method to your superclass by calling DoSuperMethod(). This method is meant for your class only. If your superclass wants to handle certain input events it MUST install an event handler itself."

I also checked with MUI 3.8 on m68k that Area class handler is NOT eating the click event, which means the behavior I described above on AROS is "correct" with regards to what should be happening taking into account TheButton code. However this should have been seen on other platforms already a long time ago, so I wonder if you can give a hint on what is happening. Is MUI Area HandleEvent method something blocking the second (DoSuperMethod-based) invocation from happening?

Second question: should the code in question be changed not to call super class method?

result = DoSuperMethodA(cl, obj, (Msg)msg);

MUIM_TheBarNoNotifySetAttr for mutual excluding buttons

Trying to set MUIV_TheBar_Attr_Selected state using MUIM_TheBar_NoNotifySetAttr on a button that is part of a mutual exclude group doesn't seem to work. I still get a notification on MUIA_Selected. As a workaround, I've tried to use MUIA_TheBar_Active with MUIA_NoNotify but that didn't do the trick either.

Alphachannel icons look ugly on OS3

Creating toolbar buttons with BRFLG_ARGB and BRFLG_AlphaMask looks quite ugly on OS3. On OS4 it's looking correctly. Just compare the two images:

os3
os4

Overriding individual user preferences

Currently, TheBar.mcc is using a pretty awkward and non-standard way of enforcing absolute prioritization of user preferences over individual application requirements. For example, setting MUIA_TheBar_ViewMode to MUIV_TheBar_ViewMode_Gfx during object creation doesn't have any effect at all. TheBar simply ignores it and uses the user's preferences instead.

The only way to override this is to set MUIA_TheBar_IgnoreAppearance to TRUE. But this is some kind of master reset because it completely drops all user settings and resets them to default values. Thus, it is currently impossible to change a single user setting to a hardcoded one without going back to factory settings altogether, i.e. it's not possible to enforce an icon-only toolbar without doing a hard reset using MUIA_TheBar_IgnoreAppearance.

I think this needs a more elegant solution because the current one is not very useful.

Here is another example: Say an app wants to use MUIA_TheBar_MouseOver. According to the docs, this only works with either MUIA_TheBar_Raised or MUIA_TheBar_Sunny set to TRUE. However, the latter two are user settings once again and apps cannot override them without doing a master reset using MUIA_TheBar_IgnoreAppearance. So apps can't really use MUIA_TheBar_MouseOver with the user's settings at all because you don't know whether or not the user has SUNNY or RAISED enabled. It's all pretty messed up IMHO and needs some better design.

Improve graying out algorithm for toolbars with no explicit disabled images

When creating a toolbar which doesn't specify separate images for disabled buttons, the standard "graying out" algorithm used by TheBar doesn't look so attractive. See here:

os4

IMHO it would be nicer to use a different algorithm that converts the icon to grayscale or something like that. The current algorithm doesn't look so nice for alphachannel images. It was probably designed for palette based graphics.

Add support for on mouse over notification

Is there an attribute that is set whenever the mouse pointer is over a toolbar button? I see that there is MUIA_TheBar_MouseOver but it only works with the "Raised" and "Sunny" styles. I'd like to have an attribute that works with all styles. Practical use: I want to display extended help information in a status bar for every toolbar button. I know there is tooltip help for the individual buttons but I'd like to display help texts in the status bar too so I need to find a way to get notified when the mouse pointer is over a toolbar button.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.