Skip to content

Commit

Permalink
Base: Rename maximize/minimize icons to a more generic name
Browse files Browse the repository at this point in the history
This reduces naming confusion when the icons are used for other
use cases that require a triangle shape
  • Loading branch information
IdanHo authored and awesomekling committed Dec 28, 2020
1 parent 26cb083 commit 6efdabf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Applications/ThemeEditor/PreviewWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ PreviewWidget::PreviewWidget(const Gfx::Palette& preview_palette)
m_inactive_window_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window.png");

m_close_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-close.png");
m_maximize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-maximize.png");
m_minimize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-minimize.png");
m_maximize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/upward-triangle.png");
m_minimize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/downward-triangle.png");

m_gallery = add<MiniWidgetGallery>();
set_greedy_for_hits(true);
Expand Down
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions Services/WindowServer/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ static Gfx::Bitmap& minimize_icon()
{
static Gfx::Bitmap* s_icon;
if (!s_icon)
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-minimize.png").leak_ref();
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/downward-triangle.png").leak_ref();
return *s_icon;
}

static Gfx::Bitmap& maximize_icon()
{
static Gfx::Bitmap* s_icon;
if (!s_icon)
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-maximize.png").leak_ref();
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/upward-triangle.png").leak_ref();
return *s_icon;
}

Expand Down
4 changes: 2 additions & 2 deletions Services/WindowServer/WindowFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ void WindowFrame::set_button_icons()
full_path.append(icons_path);
full_path.append("window-minimize.png");
if (!(s_minimize_icon = Gfx::Bitmap::load_from_file(full_path.to_string()).leak_ref()))
s_minimize_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-minimize.png").leak_ref();
s_minimize_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/downward-triangle.png").leak_ref();
full_path.clear();
}
if (!s_maximize_icon || s_last_title_button_icons_path != icons_path) {
full_path.append(icons_path);
full_path.append("window-maximize.png");
if (!(s_maximize_icon = Gfx::Bitmap::load_from_file(full_path.to_string()).leak_ref()))
s_maximize_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-maximize.png").leak_ref();
s_maximize_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/upward-triangle.png").leak_ref();
full_path.clear();
}
if (!s_restore_icon || s_last_title_button_icons_path != icons_path) {
Expand Down

0 comments on commit 6efdabf

Please sign in to comment.