remove unused test code, fix presets panel height on high dp, update quick panel on alt+rdrag resize
This commit is contained in:
@@ -190,8 +190,7 @@ void CanvasModePen::on_MouseEvent(MouseEvent* me, glm::vec2& loc)
|
||||
auto diff = m_cur_pos - m_size_pos_start;
|
||||
auto curve = App::I.stroke->m_curves[App::I.stroke->m_tip_size];
|
||||
Canvas::I->m_current_brush->m_tip_size = glm::max(curve.to_value(m_size_value_start + diff.x * 0.001f), 0.001f);
|
||||
if (App::I.stroke)
|
||||
App::I.stroke->update_controls();
|
||||
App::I.brush_update();
|
||||
}
|
||||
m_cur_pos = loc;
|
||||
break;
|
||||
|
||||
21
src/main.cpp
21
src/main.cpp
@@ -448,27 +448,6 @@ void init_vk_map()
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
ABR abr;
|
||||
abr.open("D:\\assets\\ABR\\coldyn.abr");
|
||||
|
||||
BinaryStreamWriter sw;
|
||||
abr.m_presets[0]->write(sw);
|
||||
|
||||
std::vector<uint8_t> data;
|
||||
for (int i = 0; i < 10; i++)
|
||||
data.resize(data.size() + rand() % 10, i % 2);
|
||||
BinaryStreamWriter w;
|
||||
w.wrle(data);
|
||||
BinaryStreamReader r;
|
||||
r.init(w.m_data.data(), w.m_data.size());
|
||||
auto decoded = r.rrle(w.m_data.size());
|
||||
|
||||
assert(data.size() == decoded.size());
|
||||
for (int i = 0; i < data.size(); i++)
|
||||
{
|
||||
assert(data[i] == decoded[i]);
|
||||
}
|
||||
|
||||
WNDCLASS wc;
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ void NodePanelQuick::handle_button_brush_click(Node* button)
|
||||
tick->SetSize(16, 32);
|
||||
tick->SetPosition(pos.x, pos.y + (button->m_size.y - 32) * 0.5f);
|
||||
tick->set_image("data/ui/popup-tick.png");
|
||||
float hh = App::I.presets->m_container->m_children.size() > 10 ? App::I.height - 90.f * App::I.zoom : 400.f;
|
||||
float hh = App::I.presets->m_container->m_children.size() > 10 ? (App::I.height / App::I.zoom - 90.f) : 400.f;
|
||||
App::I.presets->SetHeight(glm::max(hh, 400.f));
|
||||
root()->update();
|
||||
if ((pos.y + App::I.presets->m_size.y) > screen.y)
|
||||
|
||||
Reference in New Issue
Block a user