improve RTL workflow

This commit is contained in:
2019-05-20 19:31:05 +02:00
parent 1c822e5542
commit e5a3d803c9
3 changed files with 20 additions and 8 deletions

View File

@@ -119,7 +119,7 @@ void NodePanelQuick::init_controls()
m_slider_size = find<NodeSliderV>("quick-size");
m_slider_size->on_value_changed = [this](Node* target, float value) {
float off = m_slider_flow->m_pos.x > App::I.width / 2.f ? -100.f : 100.f;
float off = App::I.ui_rtl ? -100.f : 100.f;
auto newpos = (m_slider_flow->m_pos + glm::vec2(off, m_slider_flow->m_size.y / 2.f)) * App::I.zoom;
if (auto m = dynamic_cast<CanvasModePen*>(Canvas::I->modes[(int)Canvas::I->m_current_mode][0]))
{
@@ -138,7 +138,7 @@ void NodePanelQuick::init_controls()
};
m_slider_flow = find<NodeSliderV>("quick-flow");
m_slider_flow->on_value_changed = [this](Node* target, float value) {
float off = m_slider_flow->m_pos.x > App::I.width / 2.f ? -100.f : 100.f;
float off = App::I.ui_rtl ? -100.f : 100.f;
auto newpos = (m_slider_flow->m_pos + glm::vec2(off, m_slider_flow->m_size.y / 2.f)) * App::I.zoom;
if (auto m = dynamic_cast<CanvasModePen*>(Canvas::I->modes[(int)Canvas::I->m_current_mode][0]))
{