gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnustep/libs-gui] NSPopUpButton's popup menu in pulldown mode displ


From: Sergii Stoian
Subject: Re: [gnustep/libs-gui] NSPopUpButton's popup menu in pulldown mode displaying fix (#43)
Date: Fri, 20 Dec 2019 18:45:20 +0200

On Fri, Dec 20, 2019 at 5:11 PM Fred Kiefer <address@hidden> wrote:


> Am 20.12.2019 um 15:20 schrieb Sergii Stoian <address@hidden>:
>
> On Fri, Dec 20, 2019 at 2:24 PM Fred Kiefer <address@hidden> wrote:
>
>
> > Am 20.12.2019 um 11:34 schrieb Sergii Stoian <address@hidden>:
> >
> > I've moved discussion to mail list as Fred asked me.
> >
> > On Fri, Dec 20, 2019 at 12:18 PM Fred Kiefer <address@hidden> wrote:
> > Some of the changes of this pull request are obviously correct. What I doubt is the overall change. Why would we want to display the title item (that is the first item in a pull down) in the menu?
> > This is the main difference between pull down and pop up and it is well documented.
> >
> > Do you mean GNUstep documentation or Apple?
>
> Apple’s documentation. According to this, the first item of a pull down is the title and not displayed when showing the menu. This is what GNUstep has implemented up to now.
>
> Give me a link please to that documentation.
> Here https://developer.apple.com/documentation/appkit/nspopupbutton/1532070-pullsdown?language=objc I've git this: "This property does not affect the contents of the menu; it affects only the style of the menu.“

Close :-)

https://developer.apple.com/documentation/appkit/nspopupbuttoncell/1528475-settitle?language=objc

Ok, this page says how popup button gets its string value. I've change nothing in this context.

> > I just tired this on Cocoa and the difference is still there.
> >
> > What particular difference did you observe from practical point of view? What consequences do you expect?
>
> As I unterstand it you want to display the title as the first item in the menu, but as a disabled one. This will look different than it did before.
>
> Fred, have you tried libs-gui with my change?
> The only difference is correct drawing of left and top border of button while mouse is down.
> On the contrary with my change popup button menu looks the same no matter what style was selected pulldown or normal.

No, I have not tried to run an application with this code in place. I was relying on our comment "Before this change popup menu doesn't display first item and was placed to the bottom edge of popup button“ and the changes I see in the code.
 
I'll fix comment.

I really prefer reading code then running it.

That's why you can't understand what's changed. :(
 
The idea behind the current code is that the title does not belong into the menu and gets displayed on the popup button only, how ever that gets drawn. And the menu opens up below it.

I clearely understand it. This is true for normal popup button either. Button cell is not menu item cell in both cases - it gets its title string from selected menu item and not replaces cell. I see no problem here.

> Having this as a theme or with a user setable option would be fine for me. But changing the default here is something that needs to be discussed more widely.
>
> > Of course changing this would simplify the code here a lot and I would love to see that, but this changes the whole appearance of pull down items and this needs to be decided on a completely different level.
> >
> > So we're here.
> > Any thoughts, guys?
>
> No, I personally don’t have much of a position on this point. Why do you want to change the behaviour?
>
> I'll describe reasons and intentions in PR: https://github.com/gnustep/libs-gui/pull/43.

There you just describe that now the popup looks the same whether in pull down or in popup state. But what is the reason for this change?

Did you see this "Although popup menu can't draw dark gray border around popup button.".
That's the real change and is essential from UX perspective. Anything else stays untouched.
 
As I wrote I am happy with getting rid of all this special code, but last time I tried to do this it was rejected.

Let's make it happen finally. :)

--
Sergii Stoian

reply via email to

[Prev in Thread] Current Thread [Next in Thread]