Grubuntu / PieMenu

Fork of PieMenu, with some improvements
8 stars 4 forks source link

[Feature request] Shape of the piemenu #14

Closed Grubuntu closed 7 months ago

Grubuntu commented 7 months ago

When a pieMenu has less than 6 to 8 elements, the buttons are far from each other. Actually : Capture d’écran (33) Capture d’écran (34) Capture d’écran (35) Capture d’écran (36) Capture d’écran (37)

I thought I modified the code a little to ensure that when there are less than 8 elements in the menu, they are positioned first at the top... in the shape of a rainbow.

Capture d’écran (39) Capture d’écran (40) Capture d’écran (41) Capture d’écran (42) Capture d’écran (43) Capture d’écran (44) Capture d’écran (45)

Do you think this is a good idea, or is this not a good design for use?

Actual code : https://github.com/Grubuntu/PieMenu-Improved/blob/56a110cf3a77ed17c2eed5a9fb1e663d03f26295/InitGui.py#L821-L832

Proposed code change :

            if commandNumber == 1:
                angle = 0
                buttonSize = self.buttonSize
                #####Adjust PieMenus when there is less than 8 QtoolButtons  ######
                angleStart = 3 * math.pi / 2 - angle
            else:
                if commandNumber < 8:
                    angle = 2 * math.pi / 8
                else:
                    angle = 2 * math.pi / commandNumber

                buttonRadius = math.sin(angle / 2) * self.radius
                buttonSize = math.trunc(2 * buttonRadius / math.sqrt(2))
            if commandNumber > 1:
                angleStart = 3 * math.pi / 2 - (angle*(commandNumber+1))/2
                ##### End Adjust PieMenus when there is less than 8 QtoolButtons######
            if buttonSize > self.buttonSize:
                buttonSize = self.buttonSize
            else:
                pass
pgilfernandez commented 7 months ago

Do you think this is a good idea, or is this not a good design for use?

Yes, I like the idea as I know some users would prefer this behavior but I would like to propose you something bigger and more customizable: some users reported they would like pies to not open in a circular shape but as a stack of table of rows and columns. That way, I would suggest to extend each pie with a new parameter that let users choose the "type of pie". That way we can add different ways of arranging the pie commands and users just choose them from a list. Some ideas:

Screenshot 2024-01-21 at 18 18 16 Screenshot 2024-01-21 at 18 18 26 Screenshot 2024-01-21 at 18 18 49

The same way you can imagine another set vertically.

That is, a list of pie layout style:

What do you think?

Grubuntu commented 7 months ago
  • circle (classic)
  • circle (top to bottom, the one you are proposing)
  • circle (bottom to top, why not?)
  • table top
  • table bottom
  • table top-bottom
  • table left
  • table right
  • table left-right
  • ... more?

What do you think?

These are very good ideas, as long as the user can choose, it's very good.

This will take a little time to complete and make some choices (in particular, for the maximum number of shortcuts to display). Great work to come.

pgilfernandez commented 7 months ago

Well, I think common sense will tell each user what maximum number of commands to add, but I guess it has to be around 12 on each side (in the case you use top-and-bottom or left-and-right)... BTW, I don't like using more than 8 commands in circle ones as it's the only way to truly remember their position.

What I'm unsure about, is if we should let users decide their number of rows and columns or just play with fixed ones we decide internally and see if it works or there are users that ask for further customization...

Related with your original suggestion, I would like to ask for another "simple" feature that makes this one a little bit more complicated, just because it adds a new dimension on how to arrange icons, but let me introduce it in a new "Feature request", here it is.

Grubuntu commented 7 months ago

v1.3.5 : I have updated the code with some shapes. We will be able to add others as the tests progress.