mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:47:35 +00:00
PixelPaint: Make tools use the new API for property change shortcuts
Every tool that has a slider now registers the primary/secondary sliders and now uses the same keyboard shortcuts to modify the primary and secondary properties. `[` and `]` for the primary, `{` and `}` for the secondary.
This commit is contained in:
parent
d28fb8926f
commit
280cbf2e18
10 changed files with 15 additions and 0 deletions
|
@ -141,6 +141,7 @@ GUI::Widget* BrushTool::get_properties_widget()
|
|||
size_slider.on_change = [&](int value) {
|
||||
m_size = value;
|
||||
};
|
||||
set_primary_slider(&size_slider);
|
||||
|
||||
auto& hardness_container = m_properties_widget->add<GUI::Widget>();
|
||||
hardness_container.set_fixed_height(20);
|
||||
|
@ -157,6 +158,7 @@ GUI::Widget* BrushTool::get_properties_widget()
|
|||
hardness_slider.on_change = [&](int value) {
|
||||
m_hardness = value;
|
||||
};
|
||||
set_secondary_slider(&hardness_slider);
|
||||
}
|
||||
|
||||
return m_properties_widget.ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue