mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
WindowServer+LibGUI: Add "frameless" window flag
This allows you to create windows with no title bar or window frame.
This commit is contained in:
parent
bb7eb3e104
commit
d847304cb9
Notes:
sideshowbarker
2024-07-19 07:07:17 +09:00
Author: https://github.com/awesomekling
Commit: d847304cb9
6 changed files with 18 additions and 0 deletions
|
@ -257,6 +257,9 @@ void WindowFrame::paint_normal_frame(Gfx::Painter& painter)
|
|||
|
||||
void WindowFrame::paint(Gfx::Painter& painter)
|
||||
{
|
||||
if (m_window.is_frameless())
|
||||
return;
|
||||
|
||||
Gfx::PainterStateSaver saver(painter);
|
||||
painter.translate(rect().location());
|
||||
|
||||
|
@ -274,6 +277,9 @@ void WindowFrame::paint(Gfx::Painter& painter)
|
|||
|
||||
static Gfx::Rect frame_rect_for_window(Window& window, const Gfx::Rect& rect)
|
||||
{
|
||||
if (window.is_frameless())
|
||||
return rect;
|
||||
|
||||
auto type = window.type();
|
||||
|
||||
switch (type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue