mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 09:47:58 +01:00
Fixes #755. Click respect the highlight Menu.
This commit is contained in:
@@ -1217,7 +1217,7 @@ namespace Terminal.Gui {
|
||||
int pos = 1;
|
||||
int cx = me.X;
|
||||
for (int i = 0; i < Menus.Length; i++) {
|
||||
if (cx > pos && me.X < pos + 1 + Menus [i].TitleLength) {
|
||||
if (cx >= pos && cx < pos + 1 + Menus [i].TitleLength + 2) {
|
||||
if (me.Flags == MouseFlags.Button1Clicked) {
|
||||
if (Menus [i].IsTopLevel) {
|
||||
var menu = new Menu (this, i, 0, Menus [i]);
|
||||
@@ -1242,7 +1242,7 @@ namespace Terminal.Gui {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
pos += 2 + Menus [i].TitleLength + 1;
|
||||
pos += 1 + Menus [i].TitleLength + 2;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user