Tooltip will hide itself in no-titlebar mode
This commit is contained in:
@@ -693,10 +693,12 @@ struct TooltipsWindow : public Window
|
|||||||
if (pt.y + sm_height > scr_bot) pt.y = min(_cursor.pos.y + _cursor.total_offs.y - 5, scr_bot) - sm_height;
|
if (pt.y + sm_height > scr_bot) pt.y = min(_cursor.pos.y + _cursor.total_offs.y - 5, scr_bot) - sm_height;
|
||||||
pt.x = sm_width >= _screen.width ? 0 : Clamp(_cursor.pos.x - (sm_width >> 1), 0, _screen.width - sm_width);
|
pt.x = sm_width >= _screen.width ? 0 : Clamp(_cursor.pos.x - (sm_width >> 1), 0, _screen.width - sm_width);
|
||||||
|
|
||||||
// Move it to the top of the screen, away from mouse cursor, so it won't steal screen taps on Android
|
if (_settings_client.gui.windows_titlebars) {
|
||||||
pt.y = GetMainViewTop();
|
// Move it to the top of the screen, away from mouse cursor, so it won't steal screen taps on Android
|
||||||
if (_cursor.pos.y < pt.y + GetMinSizing(NWST_STEP)) {
|
pt.y = GetMainViewTop();
|
||||||
pt.x = _cursor.pos.x > _screen.width / 2 ? GetMinSizing(NWST_STEP) : _screen.width - sm_width - GetMinSizing(NWST_STEP);
|
if (_cursor.pos.y < pt.y + GetMinSizing(NWST_STEP)) {
|
||||||
|
pt.x = _cursor.pos.x > _screen.width / 2 ? GetMinSizing(NWST_STEP) : _screen.width - sm_width - GetMinSizing(NWST_STEP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pt;
|
return pt;
|
||||||
|
|||||||
Reference in New Issue
Block a user