mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
LibGUI+LibGfx: Let Desktop::the() set widget effects
Scrolling can now be set Coarse or Smooth system-wide, Splitter knurls and Tab accents toggled on and off, and Menu flashing disabled.
This commit is contained in:
parent
1d445356b6
commit
5917545633
8 changed files with 28 additions and 19 deletions
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Desktop.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/UIDimensions.h>
|
||||
|
@ -60,10 +61,12 @@ void Splitter::paint_event(PaintEvent& event)
|
|||
auto& rect = grabbable.paint_rect;
|
||||
int primary = rect.center().primary_offset_for_orientation(m_orientation) - 1;
|
||||
int secondary = rect.center().secondary_offset_for_orientation(m_orientation) - (total_knurling_width / 2) + (i * (knurl_width + knurl_spacing));
|
||||
if (m_orientation == Gfx::Orientation::Vertical)
|
||||
paint_knurl(secondary, primary);
|
||||
else
|
||||
paint_knurl(primary, secondary);
|
||||
if (Desktop::the().system_effects().splitter_knurls()) {
|
||||
if (m_orientation == Gfx::Orientation::Vertical)
|
||||
paint_knurl(secondary, primary);
|
||||
else
|
||||
paint_knurl(primary, secondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue