Add switch for "multiple windows" in Edit > Preferences > General

As the "multiple windows" feature is still buggy (#3556) and we've
disabled it by default, it's nice to make this option more visible (in
the General section) so users reliant on this will find the switch
quickly.
This commit is contained in:
David Capello 2023-02-24 17:11:51 -03:00
parent 495a0b4684
commit c900327675
7 changed files with 39 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -444,6 +444,8 @@
<part id="cursor_skew_e" x="288" y="176" w="16" h="16" focusx="8" focusy="8" /> <part id="cursor_skew_e" x="288" y="176" w="16" h="16" focusx="8" focusy="8" />
<part id="cursor_skew_nw" x="272" y="160" w="16" h="16" focusx="8" focusy="8" /> <part id="cursor_skew_nw" x="272" y="160" w="16" h="16" focusx="8" focusy="8" />
<part id="cursor_skew_ne" x="288" y="160" w="16" h="16" focusx="8" focusy="8" /> <part id="cursor_skew_ne" x="288" y="160" w="16" h="16" focusx="8" focusy="8" />
<part id="one_win_icon" x="96" y="256" w="8" h="7" />
<part id="multi_win_icon" x="104" y="256" w="8" h="7" />
</parts> </parts>
<styles> <styles>
<style id="box" /> <style id="box" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -440,6 +440,8 @@
<part id="cursor_skew_e" x="288" y="176" w="16" h="16" focusx="8" focusy="8" /> <part id="cursor_skew_e" x="288" y="176" w="16" h="16" focusx="8" focusy="8" />
<part id="cursor_skew_nw" x="272" y="160" w="16" h="16" focusx="8" focusy="8" /> <part id="cursor_skew_nw" x="272" y="160" w="16" h="16" focusx="8" focusy="8" />
<part id="cursor_skew_ne" x="288" y="160" w="16" h="16" focusx="8" focusy="8" /> <part id="cursor_skew_ne" x="288" y="160" w="16" h="16" focusx="8" focusy="8" />
<part id="one_win_icon" x="96" y="256" w="8" h="7" />
<part id="multi_win_icon" x="104" y="256" w="8" h="7" />
</parts> </parts>
<styles> <styles>
<style id="box" /> <style id="box" />

View File

@ -1438,6 +1438,16 @@ section_theme = Theme
section_extensions = Extensions section_extensions = Extensions
section_experimental = Experimental section_experimental = Experimental
general = General general = General
ui_windows = User Interface:
one_win = <<<END
Confine the user interface to one native window.
i.e. Menus, Preview, popups are inside the main window area.
END
multi_win = <<<END
Create one native window for each interface window.
i.e. Menus, Preview, popups have their own window.
END
theme_mode = Theme Mode:
screen_scaling = Screen Scaling: screen_scaling = Screen Scaling:
ui_scaling = UI Elements Scaling: ui_scaling = UI Elements Scaling:
language = Language: language = Language:

View File

@ -32,6 +32,18 @@
<vbox id="section_general"> <vbox id="section_general">
<separator text="@.section_general" horizontal="true" /> <separator text="@.section_general" horizontal="true" />
<grid columns="3"> <grid columns="3">
<label text="@.ui_windows" />
<hbox>
<buttonset columns="2" id="ui_windows">
<item icon="one_win_icon" tooltip="@.one_win" tooltip_dir="bottom" />
<item icon="multi_win_icon" tooltip="@.multi_win" tooltip_dir="bottom" />
</buttonset>
<hbox id="theme_variants">
<label text="@.theme_mode" />
</hbox>
</hbox>
<boxfiller />
<label text="@.screen_scaling" /> <label text="@.screen_scaling" />
<combobox id="screen_scale"> <combobox id="screen_scale">
<listitem text="100%" value="1" /> <listitem text="100%" value="1" />
@ -39,7 +51,7 @@
<listitem text="300%" value="3" /> <listitem text="300%" value="3" />
<listitem text="400%" value="4" /> <listitem text="400%" value="4" />
</combobox> </combobox>
<hbox id="theme_variants" /> <boxfiller />
<label text="@.ui_scaling" /> <label text="@.ui_scaling" />
<combobox id="ui_scale"> <combobox id="ui_scale">

View File

@ -484,6 +484,17 @@ public:
gridScope()->Change.connect([this]{ onChangeGridScope(); }); gridScope()->Change.connect([this]{ onChangeGridScope(); });
} }
// Update the one/multiple window buttonset (and keep in on sync
// with the old/experimental checkbox)
uiWindows()->setSelectedItem(multipleWindows()->isSelected() ? 1: 0);
uiWindows()->ItemChange.connect([this]() {
multipleWindows()->setSelected(uiWindows()->selectedItem() == 1);
});
multipleWindows()->Click.connect([this](){
uiWindows()->setSelectedItem(multipleWindows()->isSelected() ? 1: 0);
});
// Scaling
selectScalingItems(); selectScalingItems();
#ifdef _DEBUG // TODO enable this on Release when Aseprite supports #ifdef _DEBUG // TODO enable this on Release when Aseprite supports
@ -942,6 +953,7 @@ private:
m_themeVars->deferDelete(); m_themeVars->deferDelete();
} }
m_themeVars = list; m_themeVars = list;
themeVariants()->setVisible(list ? true: false);
} }
void fillExtensionsCombobox(ui::ComboBox* combobox, void fillExtensionsCombobox(ui::ComboBox* combobox,