mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 03:16:58 +00:00
Do not center editor scroll by default when we zoom with keys or zoom tool
This commit is contained in:
parent
6a1809b814
commit
cd913f7619
@ -23,6 +23,7 @@
|
||||
</hbox>
|
||||
<check text="Show timeline automatically" id="autotimeline" tooltip="Show the timeline automatically when a new frame or layer is added." />
|
||||
<check text="Expand menu bar items on mouseover" id="expand_menubar_on_mouseover" tooltip="Check this option to get this old menus behavior." />
|
||||
<check text="Center editor when zoom with keys or zoom tool" id="center_on_zoom" />
|
||||
<separator horizontal="true" />
|
||||
<link id="locate_file" text="Locate Configuration File" />
|
||||
<link id="locate_crash_folder" text="Locate Crash Folder" />
|
||||
|
@ -78,6 +78,9 @@ public:
|
||||
ui::MenuBar::expandOnMouseover()))
|
||||
expandMenubarOnMouseover()->setSelected(true);
|
||||
|
||||
if (get_config_bool("Editor", "CenterOnZoom", false))
|
||||
centerOnZoom()->setSelected(true);
|
||||
|
||||
if (m_settings->experimental()->useNativeCursor())
|
||||
nativeCursor()->setSelected(true);
|
||||
|
||||
@ -154,6 +157,8 @@ public:
|
||||
set_config_bool("Options", "ExpandMenuBarOnMouseover", expandOnMouseover);
|
||||
ui::MenuBar::setExpandOnMouseover(expandOnMouseover);
|
||||
|
||||
set_config_bool("Editor", "CenterOnZoom", centerOnZoom()->isSelected());
|
||||
|
||||
m_settings->setShowSpriteEditorScrollbars(showScrollbars()->isSelected());
|
||||
m_settings->setZoomWithScrollWheel(wheelZoom()->isSelected());
|
||||
m_settings->setRightClickMode(static_cast<RightClickMode>(rightClickBehavior()->getSelectedItemIndex()));
|
||||
|
@ -1305,7 +1305,7 @@ void Editor::setZoomAndCenterInMouse(int zoom, int mouse_x, int mouse_y, ZoomBeh
|
||||
|
||||
switch (zoomBehavior) {
|
||||
case kCofiguredZoomBehavior:
|
||||
centerMouse = get_config_bool("Editor", "CenterMouseInZoom", true);
|
||||
centerMouse = get_config_bool("Editor", "CenterOnZoom", false);
|
||||
break;
|
||||
case kCenterOnZoom:
|
||||
centerMouse = true;
|
||||
|
Loading…
Reference in New Issue
Block a user