mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:47:44 +00:00
WindowServer: Simplify WindowFrame shadow logic a little bit
Remove the confusingly-named inflate_for_shadow() function and inline its logic into render_to_cache(). And remove the m_shadow_offset member variable since it was only needed locally in one place. Also improve some variable names to make it more understandable what is going on.
This commit is contained in:
parent
20fb30d857
commit
88b168ff16
2 changed files with 36 additions and 43 deletions
|
@ -88,9 +88,8 @@ private:
|
|||
void paint_normal_frame(Gfx::Painter&);
|
||||
void paint_tool_window_frame(Gfx::Painter&);
|
||||
void paint_menubar(Gfx::Painter&);
|
||||
Gfx::Bitmap* window_shadow() const;
|
||||
Gfx::Bitmap* shadow_bitmap() const;
|
||||
Gfx::IntRect inflated_for_shadow(const Gfx::IntRect&) const;
|
||||
Gfx::Bitmap* inflate_for_shadow(Gfx::IntRect&, Gfx::IntPoint&) const;
|
||||
|
||||
void handle_menubar_mouse_event(const MouseEvent&);
|
||||
void handle_menu_mouse_event(Menu&, const MouseEvent&);
|
||||
|
@ -104,8 +103,6 @@ private:
|
|||
Button* m_maximize_button { nullptr };
|
||||
Button* m_minimize_button { nullptr };
|
||||
|
||||
Gfx::IntPoint m_shadow_offset {};
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_top_bottom;
|
||||
RefPtr<Gfx::Bitmap> m_left_right;
|
||||
int m_bottom_y { 0 }; // y-offset in m_top_bottom for the bottom half
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue