restore undo buttons to main toolbar, show cursor on quick resize
This commit is contained in:
@@ -1541,7 +1541,7 @@ Here's a list of what's available in this release.
|
||||
</node>
|
||||
</border>
|
||||
<!-- toolbar -->
|
||||
<border id="toolbar" height="60" width="100%" pad="5" dir="row" color="0 0 0 0.6" mouse-capture="true">
|
||||
<border id="toolbar" height="50" width="100%" pad="5" dir="row" color="0 0 0 0.6" mouse-capture="true">
|
||||
<!--
|
||||
<button id="btn-open" width="50" height="100%" margin="0 5 0 0" text="Open"/>
|
||||
<button id="btn-save" width="50" height="100%" margin="0 5 0 0" text="Save"/>
|
||||
@@ -1569,31 +1569,31 @@ Here's a list of what's available in this release.
|
||||
|
||||
<node dir="row" margin="0 0 0 0" grow="1" justify="center">
|
||||
<!--panel togglers-->
|
||||
<button-custom id="btn-stroke" width="50" height="50" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<button-custom id="btn-stroke" width="40" height="40" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<image path="data/ui/stroke.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
<!--<button id="btn-brush-preset" width="50" height="50" margin="0 0 5 0" text="Preset" thickness="1" border-color=".1" pad="2"/>-->
|
||||
<!--<button id="btn-brush-preset" width="40" height="40" margin="0 0 5 0" text="Preset" thickness="1" border-color=".1" pad="2"/>-->
|
||||
<!--
|
||||
<button-custom id="btn-brush" width="50" height="50" margin="0 0 5 0" thickness="1" border-color=".1" pad="2">
|
||||
<button-custom id="btn-brush" width="40" height="40" margin="0 0 5 0" thickness="1" border-color=".1" pad="2">
|
||||
<image path="data/ui/brushes.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
-->
|
||||
<button-custom id="btn-color" width="50" height="50" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<button-custom id="btn-color" width="40" height="40" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<image path="data/ui/palette.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
<button-custom id="btn-layer" width="50" height="50" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<button-custom id="btn-layer" width="40" height="40" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<image path="data/ui/layers.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
|
||||
<button-custom id="btn-grids-panel" width="50" height="50" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<button-custom id="btn-grids-panel" width="40" height="40" margin="0 5 0 0" thickness="1" border-color=".1" pad="2">
|
||||
<image path="data/ui/grid.png" width="100%" height="100%" align="center" justify="flex-end" mips="true"/>
|
||||
</button-custom>
|
||||
</node>
|
||||
|
||||
<button-custom id="btn-undo" width="50" height="100%" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="2">
|
||||
<button-custom id="btn-undo" width="40" height="40" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="2">
|
||||
<image path="data/ui/undo.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
<button-custom id="btn-redo" width="50" height="100%" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="2">
|
||||
<button-custom id="btn-redo" width="40" height="40" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="2">
|
||||
<image path="data/ui/redo.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
<!--
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
class CanvasModePen : public CanvasMode
|
||||
{
|
||||
friend class App;
|
||||
bool m_draw_tip = false;
|
||||
bool m_dragging = false;
|
||||
glm::vec2 m_pan_start;
|
||||
glm::vec2 m_size_pos_start;
|
||||
@@ -88,6 +87,7 @@ public:
|
||||
virtual void leave() override;
|
||||
bool m_picking = false;
|
||||
glm::vec2 m_cur_pos;
|
||||
bool m_draw_tip = false;
|
||||
};
|
||||
|
||||
class CanvasModeLine : public CanvasMode
|
||||
|
||||
@@ -43,6 +43,7 @@ void NodePanelQuick::init_controls()
|
||||
m_slider_size->on_value_changed = [this](Node* target, float value) {
|
||||
auto m = static_cast<CanvasModePen*>(Canvas::I->modes[(int)kCanvasMode::Draw][0]);
|
||||
m->m_cur_pos = (m_slider_flow->m_pos + glm::vec2(100.f, m_slider_flow->m_size.y / 2.f)) * App::I.zoom;
|
||||
m->m_draw_tip = true;
|
||||
m_button_brush_current_preview->draw_stroke();
|
||||
if (on_size_change)
|
||||
on_size_change(target, value);
|
||||
@@ -51,6 +52,7 @@ void NodePanelQuick::init_controls()
|
||||
m_slider_flow->on_value_changed = [this](Node* target, float value) {
|
||||
auto m = static_cast<CanvasModePen*>(Canvas::I->modes[(int)kCanvasMode::Draw][0]);
|
||||
m->m_cur_pos = (m_slider_flow->m_pos + glm::vec2(100.f, m_slider_flow->m_size.y / 2.f)) * App::I.zoom;
|
||||
m->m_draw_tip = true;
|
||||
m_button_brush_current_preview->draw_stroke();
|
||||
if (on_flow_change)
|
||||
on_flow_change(target, value);
|
||||
|
||||
Reference in New Issue
Block a user