Save/load timeline layer panel width to/from preferences file

From: https://community.aseprite.org/t/2276
This commit is contained in:
David Capello 2018-11-26 17:02:43 -03:00
parent aea8e9cd83
commit 42fa197b42
2 changed files with 6 additions and 1 deletions

View File

@ -125,6 +125,7 @@
<option id="data_recovery_period" type="double" default="2.0" />
<option id="show_full_path" type="bool" default="true" />
<option id="timeline_position" type="TimelinePosition" default="TimelinePosition::BOTTOM" />
<option id="timeline_layer_panel_width" type="int" default="100" />
<option id="show_menu_bar" type="bool" default="true" />
<option id="recent_items" type="int" default="16" />
</section>

View File

@ -239,7 +239,8 @@ Timeline::Timeline()
, m_state(STATE_STANDBY)
, m_tagBands(0)
, m_tagFocusBand(-1)
, m_separator_x(100 * guiscale())
, m_separator_x(
Preferences::instance().general.timelineLayerPanelWidth() * guiscale())
, m_separator_w(1)
, m_confPopup(NULL)
, m_clipboard_timer(100, this)
@ -267,6 +268,9 @@ Timeline::Timeline()
Timeline::~Timeline()
{
Preferences::instance().general.timelineLayerPanelWidth(
m_separator_x / guiscale());
m_clipboard_timer.stop();
detachDocument();