Blender Git Loki
Git Commits -> Revision e655413
Revision e655413 by Julian Eisel (temp-asset-browser-poselib-merge) July 14, 2021, 20:49 (GMT) |
UI: Auto-scroll to keep active text buttons in view If a text button is activated that is not in view (i.e. scrolled away), the scrolling will now be adjusted to have it in view (with some small additional margin). While entering text, the view may also be updated should the button move out of view, for whatever reason. For the most part, this feature shouldn't be needed and won't kick in, except when a clicked on text button is partially out of view or very close to the region edge. It's however quite important for the previously committed feature, that is, pressing Ctrl+F to start searching in a UI list. The end of the list where the scroll button appears may not be in view. Plus while filtering the number of visible items changes so the scrolling has to be updated to keep the search button visible. Note that I disabled the auto-scrolling for when the text button spawned an additional popup, like for search-box buttons. That is because current code assumes the button to have a fixed position while the popup is open. There is no code to update the popup position together with the button/scrolling. I also think that the logic added here could be used in more places, e.g. for the "ensure file in view" logic the File Browser does. |
Commit Details:
Full Hash: e65541356bc8a15af2cd03c6380b436d77ec5a6a
Parent Commit: 8533777
Lines Changed: +189, -11
7 Modified Paths:
/source/blender/editors/include/UI_interface.h (+3, -0) (Diff)
/source/blender/editors/interface/interface.c (+37, -7) (Diff)
/source/blender/editors/interface/interface_handlers.c (+25, -0) (Diff)
/source/blender/editors/interface/interface_intern.h (+12, -0) (Diff)
/source/blender/editors/interface/interface_query.c (+14, -4) (Diff)
/source/blender/editors/interface/interface_utils.c (+96, -0) (Diff)
/source/blender/editors/screen/area.c (+2, -0) (Diff)
/source/blender/editors/interface/interface.c (+37, -7) (Diff)
/source/blender/editors/interface/interface_handlers.c (+25, -0) (Diff)
/source/blender/editors/interface/interface_intern.h (+12, -0) (Diff)
/source/blender/editors/interface/interface_query.c (+14, -4) (Diff)
/source/blender/editors/interface/interface_utils.c (+96, -0) (Diff)
/source/blender/editors/screen/area.c (+2, -0) (Diff)