Recent

Author Topic: Changing orientation of MainMenu  (Read 5903 times)

dietmar

  • Full Member
  • ***
  • Posts: 170
Changing orientation of MainMenu
« on: July 19, 2017, 09:42:24 am »
Hi,

my Main Menu looks like the first attachment.
I find that totally confusing because the submenus usually are bounded to the left side of the main menu, and especially, the arrow of the submenu points to the right, then there I expect the submenus belonging to it also to appear on the right side!
(Please see second pic for clarification what I want).

I played with the option but wasn't successful - please advise.

Thx,
Dietmar

Lazarus 2.2.0RC1 with FPC 3.2.2 (32 Bit) on Windows10 (64Bit)

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Changing orientation of MainMenu
« Reply #1 on: July 19, 2017, 10:00:10 am »
You must post a little demo showing this. In my own experiments I cannot reproduce this behavior, even with BiDiMode switched to right-to-left mode everything is consistent (all menu items aligned at the right, arrow to the left, submenus opening at the left). The only case when a submenu opens to the left in standard left-to-right mode is when it would reach beyond the right edge of the screen.

dietmar

  • Full Member
  • ***
  • Posts: 170
Re: Changing orientation of MainMenu
« Reply #2 on: July 19, 2017, 12:39:10 pm »
Hi,

find attached a minimal project which shows exaxt the wrong behaviour.

Dietmar
Lazarus 2.2.0RC1 with FPC 3.2.2 (32 Bit) on Windows10 (64Bit)

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Changing orientation of MainMenu
« Reply #3 on: July 19, 2017, 12:47:21 pm »
Works fine here in Laz 1.6.4 64 bit on Windows 10.

Is this behavior also visible in other applications?
It could be that you set your handiness to left-handed in which case the sub-menus will also dropdown on the left.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Changing orientation of MainMenu
« Reply #4 on: July 19, 2017, 12:55:35 pm »
Strange, working fine here (Laz 1.6.4 / fpc 3.0.2 and Laz trunk / fpc 3.0.2).

Maybe you should play with resetting your Lazarus profile. Open "View" > "IDE internals" > "About IDE". You find the path to your profile settings as "Primary config directory" (immediately underneath "Global IDE options"). Close Lazarus. Rename this directory (just for this experiment, rename back to the original name afterwards to get all your settings and components back). Start Lazarus, and compile the test project again. Does it still show the issue.


rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Changing orientation of MainMenu
« Reply #5 on: July 19, 2017, 01:05:51 pm »
I found the cause.

Type Windows-key + R
paste in shell:::{80F3F1D5-FECA-45F3-BC32-752C152E456E}
Goto the other tab.
Left handed should be selected for the submenu to appear on the right.

If I select right handed the submenu also appear on the left for me :D

It puzzles me because I would suspect right handed would be the default.
But maybe this is because this is a tablet setting.

If you are right handed you want the submenu to appear on the left.

For normal PC operations this should be set to left handed (even if you are right handed) :D
« Last Edit: July 19, 2017, 01:07:31 pm by rvk »

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Changing orientation of MainMenu
« Reply #6 on: July 19, 2017, 01:37:15 pm »
It works correctly on my test on Ubuntu Mate 16.10.

This is what will happen:
- If the right side has enough space, then the pop up sub menu will be shown on the right side.
- If the right side does not has enough space (you put the form on the right edge of your screen), then the pop up sub menu will be shown on the left side.

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Changing orientation of MainMenu
« Reply #7 on: July 19, 2017, 01:38:57 pm »
It works correctly on my test on Ubuntu Mate 16.10.
I already found the cause. (see my post above)
It happens under Windows if you set a switch meant for tablets to right-handed.

(even with enough space on the right, the submenu will still open on the left if that tablet mode is on right-handed)

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Changing orientation of MainMenu
« Reply #8 on: July 19, 2017, 02:14:30 pm »
So did you mean the program shows different result on Windows and Linux?

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Changing orientation of MainMenu
« Reply #9 on: July 19, 2017, 02:24:08 pm »
So did you mean the program shows different result on Windows and Linux?
Yes, If you set the Tablet PC Setting to "Right-handed" the submenus will appear on the left.

See attached images.

You also see that the main-menu (first pulldown) is alligned to the right side of the menu options.
So this is purely a Windows-issue/setting which is probably set by accident.

Setting this tablet-mode to Left-handed (which is the default) gives you the proper menu alignment.
« Last Edit: July 19, 2017, 02:26:06 pm by rvk »

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Changing orientation of MainMenu
« Reply #10 on: July 19, 2017, 02:39:39 pm »
What do MS programs look like in this mode? Does the submenu arrow point to the right (which looks wrong to me) or to the left (which conflicts with the icon bar at the left of the submenu?
« Last Edit: July 19, 2017, 02:48:23 pm by wp »

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Changing orientation of MainMenu
« Reply #11 on: July 19, 2017, 02:45:50 pm »
How to MS programs look in this mode? Does the submenu arrow point to the right (which looks wrong to me) or to the left (which conflicts with the icon bar at the left of the submenu?
Yes, this tablet mode will affect all Windows-applications.
And the arrow isn't moved to the left which is somewhat confusing.
But again... this is only when you set that tablet-mode to something other than the default.

Just try it under Windows.
Press Windows-key + R
Paste in shell:::{80F3F1D5-FECA-45F3-BC32-752C152E456E}
Goto the other tab.
Select "Right-handed" and all menus will appear on the left.

So it's just a setting in Windows.



Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Changing orientation of MainMenu
« Reply #12 on: July 19, 2017, 02:52:44 pm »
Well, it should be explained on the wiki page.
Because someone may think this is a Lazarus bug.

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Changing orientation of MainMenu
« Reply #13 on: July 19, 2017, 03:27:53 pm »
Well, it should be explained on the wiki page.
Because someone may think this is a Lazarus bug.
Like OP :)

Is it this one?
I added it there. If it needs to be moved, please let me know.
(or if it's not clear enough please edit it)

O, and would also need a translation for German and Russian :D
« Last Edit: July 19, 2017, 03:29:43 pm by rvk »

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Changing orientation of MainMenu
« Reply #14 on: July 19, 2017, 03:37:54 pm »
You're very nice. :)
Thank you for adding it.

 

TinyPortal © 2005-2018