mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +00:00
Fix layer name cell resizing in timeline during gui scaling or theme change.
This commit is contained in:
parent
264cd98ab4
commit
98366d3dee
@ -246,7 +246,7 @@ Timeline::Timeline(TooltipManager* tooltipManager)
|
|||||||
, m_tagBands(0)
|
, m_tagBands(0)
|
||||||
, m_tagFocusBand(-1)
|
, m_tagFocusBand(-1)
|
||||||
, m_separator_x(
|
, m_separator_x(
|
||||||
Preferences::instance().general.timelineLayerPanelWidth() * guiscale())
|
Preferences::instance().general.timelineLayerPanelWidth())
|
||||||
, m_separator_w(1)
|
, m_separator_w(1)
|
||||||
, m_confPopup(nullptr)
|
, m_confPopup(nullptr)
|
||||||
, m_clipboard_timer(100, this)
|
, m_clipboard_timer(100, this)
|
||||||
@ -277,8 +277,9 @@ Timeline::Timeline(TooltipManager* tooltipManager)
|
|||||||
|
|
||||||
Timeline::~Timeline()
|
Timeline::~Timeline()
|
||||||
{
|
{
|
||||||
|
// Save unscaled separator
|
||||||
Preferences::instance().general.timelineLayerPanelWidth(
|
Preferences::instance().general.timelineLayerPanelWidth(
|
||||||
m_separator_x / guiscale());
|
m_separator_x);
|
||||||
|
|
||||||
m_clipboard_timer.stop();
|
m_clipboard_timer.stop();
|
||||||
|
|
||||||
@ -4499,7 +4500,7 @@ void Timeline::setLayerCollapsedFlag(const layer_t l, const bool state)
|
|||||||
|
|
||||||
int Timeline::separatorX() const
|
int Timeline::separatorX() const
|
||||||
{
|
{
|
||||||
return std::clamp(m_separator_x,
|
return std::clamp(m_separator_x * guiscale(),
|
||||||
headerBoxWidth(),
|
headerBoxWidth(),
|
||||||
std::max(bounds().w-guiscale(),
|
std::max(bounds().w-guiscale(),
|
||||||
headerBoxWidth()));
|
headerBoxWidth()));
|
||||||
@ -4507,7 +4508,7 @@ int Timeline::separatorX() const
|
|||||||
|
|
||||||
void Timeline::setSeparatorX(int newValue)
|
void Timeline::setSeparatorX(int newValue)
|
||||||
{
|
{
|
||||||
m_separator_x = std::max(0, newValue);
|
m_separator_x = std::max(0, newValue) / guiscale();
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
|
Loading…
x
Reference in New Issue
Block a user