mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:45:10 +00:00
WindowServer+LibGUI: Remove unused Window::show_titlebar() flag
Nobody was using this flag, so let's stop maintaining it. It's easy to add it back if we ever want the behavior.
This commit is contained in:
parent
2ac1fbef4f
commit
bb7eb3e104
6 changed files with 2 additions and 17 deletions
|
@ -100,7 +100,6 @@ void Window::show()
|
|||
m_minimizable,
|
||||
m_resizable,
|
||||
m_fullscreen,
|
||||
m_show_titlebar,
|
||||
m_opacity_when_windowless,
|
||||
m_base_size,
|
||||
m_size_increment,
|
||||
|
|
|
@ -78,9 +78,6 @@ public:
|
|||
String title() const;
|
||||
void set_title(const StringView&);
|
||||
|
||||
bool show_titlebar() const { return m_show_titlebar; };
|
||||
void set_show_titlebar(bool show) { m_show_titlebar = show; };
|
||||
|
||||
Color background_color() const { return m_background_color; }
|
||||
void set_background_color(Color color) { m_background_color = color; }
|
||||
|
||||
|
@ -222,7 +219,6 @@ private:
|
|||
bool m_resizable { true };
|
||||
bool m_minimizable { true };
|
||||
bool m_fullscreen { false };
|
||||
bool m_show_titlebar { true };
|
||||
bool m_layout_pending { false };
|
||||
bool m_visible_for_timer_purposes { true };
|
||||
bool m_visible { false };
|
||||
|
|
|
@ -485,7 +485,6 @@ OwnPtr<Messages::WindowServer::CreateWindowResponse> ClientConnection::handle(co
|
|||
window->set_rect(WindowManager::the().desktop_rect());
|
||||
window->recalculate_rect();
|
||||
}
|
||||
window->set_show_titlebar(message.show_titlebar());
|
||||
window->set_opacity(message.opacity());
|
||||
window->set_size_increment(message.size_increment());
|
||||
window->set_base_size(message.base_size());
|
||||
|
|
|
@ -97,9 +97,6 @@ public:
|
|||
bool is_occluded() const { return m_occluded; }
|
||||
void set_occluded(bool);
|
||||
|
||||
bool show_titlebar() const { return m_show_titlebar; }
|
||||
void set_show_titlebar(bool show) { m_show_titlebar = show; }
|
||||
|
||||
bool is_movable() const
|
||||
{
|
||||
return m_type == WindowType::Normal;
|
||||
|
@ -262,7 +259,6 @@ private:
|
|||
WindowTileType m_tiled { WindowTileType::None };
|
||||
Gfx::Rect m_untiled_rect;
|
||||
bool m_occluded { false };
|
||||
bool m_show_titlebar { true };
|
||||
RefPtr<Gfx::Bitmap> m_backing_store;
|
||||
RefPtr<Gfx::Bitmap> m_last_backing_store;
|
||||
int m_window_id { -1 };
|
||||
|
|
|
@ -220,9 +220,6 @@ void WindowFrame::paint_normal_frame(Gfx::Painter& painter)
|
|||
|
||||
Gfx::StylePainter::paint_window_frame(painter, outer_rect, palette);
|
||||
|
||||
if (!window.show_titlebar())
|
||||
return;
|
||||
|
||||
auto titlebar_rect = title_bar_rect();
|
||||
auto titlebar_icon_rect = title_bar_icon_rect();
|
||||
auto titlebar_inner_rect = title_bar_text_rect();
|
||||
|
@ -278,15 +275,14 @@ void WindowFrame::paint(Gfx::Painter& painter)
|
|||
static Gfx::Rect frame_rect_for_window(Window& window, const Gfx::Rect& rect)
|
||||
{
|
||||
auto type = window.type();
|
||||
auto offset = !window.show_titlebar() ? (window_titlebar_height + 1) : 0;
|
||||
|
||||
switch (type) {
|
||||
case WindowType::Normal:
|
||||
return {
|
||||
rect.x() - 4,
|
||||
rect.y() - window_titlebar_height - 6 + offset,
|
||||
rect.y() - window_titlebar_height - 6,
|
||||
rect.width() + 8,
|
||||
rect.height() + 10 + window_titlebar_height - offset
|
||||
rect.height() + 10 + window_titlebar_height
|
||||
};
|
||||
case WindowType::Notification:
|
||||
return {
|
||||
|
|
|
@ -36,7 +36,6 @@ endpoint WindowServer = 2
|
|||
bool minimizable,
|
||||
bool resizable,
|
||||
bool fullscreen,
|
||||
bool show_titlebar,
|
||||
float opacity,
|
||||
Gfx::Size base_size,
|
||||
Gfx::Size size_increment,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue