44 Commits

Author SHA1 Message Date
Scorp 1d4b5b1b66 GUI: Fix ScrollContainerWidget clicks after scrolling
ScrollContainerWidget already reports child absolute positions with the current scroll offset applied through getChildX() and getChildY().

Do not add the scroll offset again when converting mouse down/up events to child-local coordinates. This keeps controls in scrolled containers, such as keymapper rows, clickable after the view has been scrolled.
2026-05-09 11:55:12 +03:00
Mohit Bankar e45bcd350c GUI: Fix ScrollContainerWidget focus regression 2026-04-24 10:57:34 +02:00
Mohit Bankar c535f5576c GUI: Fix stuck drag state in ScrollContainer when clicking popups 2026-04-24 10:57:34 +02:00
Thierry Crozat c390af49ea GUI: Fix clicking on indirect children of a ScrollContainerWidget
This fixes a regression introduced in 441f97f4e4 (Implement drag to
scroll in ScrollContainer). The computation of the X and Y location
in the child when forwarding mouse down and up events assumed that
that child was a direct child of the ScrollContainerWidget (i.e.
that the child getRelX() and getRelY() are the position relative
to the ScrollContainerWidget). That caused incorrect x and y for
children of children.

One place where this could be seen are the custom game options
(Game tab of the Game Options dialog).

This commit fixes the issue by computing the relative position
of the child to the ScrollContainerWidget from their respective
absolute location).
2026-04-23 23:00:33 +01:00
Mohit Bankar c041092694 GUI: Centralize scroll step size logic in FluidScroller 2026-04-20 23:33:23 +02:00
Mohit Bankar 84dab33d07 GUI: Implenet Fluid Scroll in ScrollContainer 2026-04-20 23:33:23 +02:00
Mohit Bankar 441f97f4e4 GUI: Implement drag to scroll in ScrollContainer 2026-04-20 23:33:23 +02:00
Eugene Sandulenko 367b059040 GUI: Fix type in ScrollCOntainerWidget height calculation 2023-09-17 00:56:28 +02:00
Cameron Cawley 7ef8da53d7 GUI: Account for the scroll bar size in ScrollContainerWidget objects 2023-05-14 22:43:57 +02:00
Die4Ever 30a8d927a1 GUI: tabs with scrollbars 2022-01-23 20:28:55 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
aryanrawlani28 7e27af8148 GUI: Code cleanup 2020-06-22 00:03:02 +02:00
aryanrawlani28 d968665110 GUI: Code cleanup and small issue fixes 2020-06-22 00:03:02 +02:00
aryanrawlani28 28c70dd196 GUI: RTL: Correctly draw for stacked dialogs 2020-06-22 00:03:02 +02:00
Bastien Bouclet eb28c5a092 GUI: Use a dialog theme layout for the unknown game dialog 2020-01-04 10:56:25 +01:00
Bastien Bouclet c0d8b6d9fc GUI: Introduce dynamic layouts
Prior to this change, a GUI layout was only affected by the screen size.
Now, a layout can additionally be influenced by the GUI dialog and widgets
that uses it. This capability is leveraged to implement the following
features:

* Layout elements that are not bound to a GUI widget do not take space.
   This means that dialogs where the widgets shown depend on for example
   a feature being enabled at configure time no longer have blank spaces.
* Widgets can define a minimal required size for their contents not to be
   cut. For now this is only used for buttons so their width is always
   sufficient for their caption not to be cut. This mechanism could be
   applied to other widget types in the future.
2020-01-04 10:56:25 +01:00
D G Turner 30c366ee5d GUI: Add Missing Switch Default Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-03 06:03:46 +01:00
Alexander Tkachev 9ba3cd594d GUI: Tune ScrollContainerWidget offsets
Well, it ain't a fix, because it's not exactly correct for any of the
themes. Yet it's the best for all of them. If I put what seems to be
correct, "modern" theme gets ruined, because it has this mystical 2px
offset in tabs/scrollcontainers.
2019-08-03 04:35:48 -04:00
Alexander Tkachev 99c2418d1a GUI: Rewrite Cloud tab
- StorageWizardDialog is removed, along with bmps it was using;
- EditTextWidget now accepts custom font in constructor;
- ScrollContainer scrollbar now jumps to top when content height changes
so it's "overscrolled";
- IndexPageHandler now does not awaits for `code` GET-parameter, as
local webserver is no longer used to connect Storages;
- CloudManager and all corresponding Storages are updated to support
disconnecting and to notify about successful connection.
2019-07-30 14:51:41 -04:00
Bastien Bouclet 7c570d9b25 GUI: Don't display the ScrollContainer background inside tabs
Fixes #10645.
2018-11-14 20:27:41 +01:00
D G Turner efcd857083 GUI: Fix Mouse Wheel Input for Unknown Game Dialog.
This should also fix this for other instances of ScrollContainer, though
the dialogs / widgets may require the same change.

This fixes bug Trac #10741.
2018-10-11 05:52:02 +01:00
Thierry Crozat 211ef61fdf GUI: Set ScrollContainer single step to kLineHeight instead of 1 pixel
The single step is the amount of scroll done when clicking once on
the scrollbar up or down arrow. It used to be 1 entry, but for the
ScrollContainer 1 entry is 1 pixel, which was too litle. Now the
single step can be set to a multiple entries.
2018-07-24 00:27:11 +01:00
Thierry Crozat f7a4b74130 GUI: Fix container widgets not receiving events 2018-07-24 00:27:11 +01:00
Bastien Bouclet 4d29ce21d0 GUI: Unify clip and non-clip draw calls 2018-04-19 19:18:39 +02:00
Bastien Bouclet 5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 2018-01-27 18:12:34 +01:00
Bastien Bouclet fc37918130 GUI: Remove explicit redraw when scrolling the ScrollContainer
The redraw is already handled by the GUI main loop
2018-01-27 18:12:34 +01:00
Bastien Bouclet 0496ede62f GUI: Implement dirty-checking for widget redraws 2018-01-27 18:12:34 +01:00
Thierry Crozat 91125bcbcd GUI: Add method to know if a widget contains a given widget 2017-04-06 21:55:28 +01:00
Alexander Tkachev 438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 2f5138f795 GUI: Minor Container fixes
I should've done these in PR, I guess.
2016-08-24 16:07:55 +06:00
Alexander Tkachev 9975307caf GUI: Fix Container's visibility issue
Now it respects outer code's decision to hide or move some widgets
around. Outer code must be CommandReceiver which is set as
ScrollContainer's target.
2016-08-24 16:07:55 +06:00
Alexander Tkachev cea58cc61c JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
Alexander Tkachev 3d636617d0 GUI: Use clipping everywhere 2016-07-03 12:24:46 +02:00
Alexander Tkachev 0ae4409138 GUI: Add ThemeLayoutTabWidget 2016-07-03 12:20:03 +02:00
Alexander Tkachev 421f9826c8 GUI: Hide scrollbar in ScrollContainerWidget when needed 2016-07-03 12:19:31 +02:00
Alexander Tkachev 40fa9b4de3 GUI: Fix ScrollContainerWidget's reflowLayout() 2016-07-03 12:19:15 +02:00
Alexander Tkachev ac25acbccc GUI: Update ScrollContainerWidget 2016-07-03 12:18:52 +02:00
Alexander Tkachev 9c1eab6415 GUI: Fix ScrollContainerWidget look a bit 2016-07-03 12:18:34 +02:00
Alexander Tkachev 31e528c070 GUI: Make ScrollContainerWidget do full redraw 2016-07-03 12:17:43 +02:00
Alexander Tkachev b946ef8598 GUI: Make ScrollContainerWidget hide children 2016-07-03 12:17:01 +02:00
Alexander Tkachev 8f2d35b0b8 GUI: drawRoundedSquareClip() 2016-07-03 12:16:26 +02:00
Alexander Tkachev 34af71a8ef GUI: Remove _clippingArea from ScrollContainer 2016-07-03 12:14:23 +02:00
Alexander Tkachev 9bf2d65dd2 GUI: Cleanup in ScrollContainer 2016-07-03 12:13:57 +02:00
Alexander Tkachev 49caaf77a1 GUI: Add ScrollContainer 2016-07-03 12:10:56 +02:00