mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +00:00
WindowServer+MouseSettings: Toggle cursor highlighting with Super+H
Rather than enabling/disabling cursor highlighting by going into mouse settings, you can now instead toggle it any time with Super+H. Mouse settings now is only for customising the look of the highlighting.
This commit is contained in:
parent
3c2c6790df
commit
5caf307ec0
5 changed files with 46 additions and 48 deletions
|
@ -51,12 +51,10 @@ ErrorOr<void> HighlightPreviewWidget::reload_cursor()
|
|||
void HighlightPreviewWidget::paint_preview(GUI::PaintEvent&)
|
||||
{
|
||||
GUI::Painter painter(*this);
|
||||
if (m_radius > 0 && m_color.alpha() > 0) {
|
||||
Gfx::AntiAliasingPainter aa_painter { painter };
|
||||
Gfx::IntRect highlight_rect { 0, 0, m_radius * 2, m_radius * 2 };
|
||||
highlight_rect.center_within(frame_inner_rect());
|
||||
aa_painter.fill_ellipse(highlight_rect, m_color);
|
||||
}
|
||||
Gfx::AntiAliasingPainter aa_painter { painter };
|
||||
Gfx::IntRect highlight_rect { 0, 0, m_radius * 2, m_radius * 2 };
|
||||
highlight_rect.center_within(frame_inner_rect());
|
||||
aa_painter.fill_ellipse(highlight_rect, m_color);
|
||||
if (m_cursor_bitmap) {
|
||||
auto cursor_rect = m_cursor_bitmap->rect();
|
||||
if (m_cursor_params.frames() > 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue