mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
This commit is contained in:
parent
86bdfa1edf
commit
a2baab38fd
141 changed files with 518 additions and 518 deletions
|
@ -9,7 +9,7 @@ set(SOURCES
|
|||
Cursor.cpp
|
||||
EventLoop.cpp
|
||||
main.cpp
|
||||
MenuBar.cpp
|
||||
Menubar.cpp
|
||||
Menu.cpp
|
||||
MenuItem.cpp
|
||||
MenuManager.cpp
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include <WindowServer/ClientConnection.h>
|
||||
#include <WindowServer/Compositor.h>
|
||||
#include <WindowServer/Menu.h>
|
||||
#include <WindowServer/MenuBar.h>
|
||||
#include <WindowServer/MenuItem.h>
|
||||
#include <WindowServer/Menubar.h>
|
||||
#include <WindowServer/Screen.h>
|
||||
#include <WindowServer/Window.h>
|
||||
#include <WindowServer/WindowClientEndpoint.h>
|
||||
|
@ -104,7 +104,7 @@ void ClientConnection::notify_about_new_screen_rect(const Gfx::IntRect& rect)
|
|||
OwnPtr<Messages::WindowServer::CreateMenubarResponse> ClientConnection::handle(const Messages::WindowServer::CreateMenubar&)
|
||||
{
|
||||
int menubar_id = m_next_menubar_id++;
|
||||
auto menubar = MenuBar::create(*this, menubar_id);
|
||||
auto menubar = Menubar::create(*this, menubar_id);
|
||||
m_menubars.set(menubar_id, move(menubar));
|
||||
return make<Messages::WindowServer::CreateMenubarResponse>(menubar_id);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ OwnPtr<Messages::WindowServer::SetWindowMenubarResponse> ClientConnection::handl
|
|||
}
|
||||
window = it->value;
|
||||
}
|
||||
RefPtr<MenuBar> menubar;
|
||||
RefPtr<Menubar> menubar;
|
||||
if (message.menubar_id() != -1) {
|
||||
auto it = m_menubars.find(message.menubar_id());
|
||||
if (it == m_menubars.end()) {
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace WindowServer {
|
|||
class Compositor;
|
||||
class Window;
|
||||
class Menu;
|
||||
class MenuBar;
|
||||
class Menubar;
|
||||
|
||||
class ClientConnection final
|
||||
: public IPC::ClientConnection<WindowClientEndpoint, WindowServerEndpoint>
|
||||
|
@ -175,7 +175,7 @@ private:
|
|||
Window* window_from_id(i32 window_id);
|
||||
|
||||
HashMap<int, NonnullRefPtr<Window>> m_windows;
|
||||
HashMap<int, NonnullRefPtr<MenuBar>> m_menubars;
|
||||
HashMap<int, NonnullRefPtr<Menubar>> m_menubars;
|
||||
HashMap<int, NonnullRefPtr<Menu>> m_menus;
|
||||
|
||||
RefPtr<Core::Timer> m_ping_timer;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
namespace WindowServer {
|
||||
|
||||
class ClientConnection;
|
||||
class MenuBar;
|
||||
class Menubar;
|
||||
|
||||
class Menu final : public Core::Object {
|
||||
C_OBJECT(Menu);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Menu.h"
|
||||
#include "MenuBar.h"
|
||||
#include "Menubar.h"
|
||||
#include "Window.h"
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
|
|
|
@ -24,22 +24,22 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "MenuBar.h"
|
||||
#include "Menubar.h"
|
||||
#include "Menu.h"
|
||||
|
||||
namespace WindowServer {
|
||||
|
||||
MenuBar::MenuBar(ClientConnection& client, int menubar_id)
|
||||
Menubar::Menubar(ClientConnection& client, int menubar_id)
|
||||
: m_client(client)
|
||||
, m_menubar_id(menubar_id)
|
||||
{
|
||||
}
|
||||
|
||||
MenuBar::~MenuBar()
|
||||
Menubar::~Menubar()
|
||||
{
|
||||
}
|
||||
|
||||
void MenuBar::add_menu(Menu& menu)
|
||||
void Menubar::add_menu(Menu& menu)
|
||||
{
|
||||
m_menus.append(&menu);
|
||||
}
|
|
@ -33,12 +33,12 @@
|
|||
|
||||
namespace WindowServer {
|
||||
|
||||
class MenuBar
|
||||
: public RefCounted<MenuBar>
|
||||
, public Weakable<MenuBar> {
|
||||
class Menubar
|
||||
: public RefCounted<Menubar>
|
||||
, public Weakable<Menubar> {
|
||||
public:
|
||||
static NonnullRefPtr<MenuBar> create(ClientConnection& client, int menubar_id) { return adopt(*new MenuBar(client, menubar_id)); }
|
||||
~MenuBar();
|
||||
static NonnullRefPtr<Menubar> create(ClientConnection& client, int menubar_id) { return adopt(*new Menubar(client, menubar_id)); }
|
||||
~Menubar();
|
||||
|
||||
ClientConnection& client() { return m_client; }
|
||||
const ClientConnection& client() const { return m_client; }
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
MenuBar(ClientConnection&, int menubar_id);
|
||||
Menubar(ClientConnection&, int menubar_id);
|
||||
|
||||
ClientConnection& m_client;
|
||||
int m_menubar_id { 0 };
|
|
@ -977,7 +977,7 @@ bool Window::hit_test(const Gfx::IntPoint& point, bool include_frame) const
|
|||
return color.alpha() >= threshold;
|
||||
}
|
||||
|
||||
void Window::set_menubar(MenuBar* menubar)
|
||||
void Window::set_menubar(Menubar* menubar)
|
||||
{
|
||||
if (m_menubar == menubar)
|
||||
return;
|
||||
|
|
|
@ -43,7 +43,7 @@ class ClientConnection;
|
|||
class Cursor;
|
||||
class KeyEvent;
|
||||
class Menu;
|
||||
class MenuBar;
|
||||
class Menubar;
|
||||
class MenuItem;
|
||||
class MouseEvent;
|
||||
|
||||
|
@ -333,9 +333,9 @@ public:
|
|||
Gfx::DisjointRectSet& transparency_rects() { return m_transparency_rects; }
|
||||
Gfx::DisjointRectSet& transparency_wallpaper_rects() { return m_transparency_wallpaper_rects; }
|
||||
|
||||
MenuBar* menubar() { return m_menubar; }
|
||||
const MenuBar* menubar() const { return m_menubar; }
|
||||
void set_menubar(MenuBar*);
|
||||
Menubar* menubar() { return m_menubar; }
|
||||
const Menubar* menubar() const { return m_menubar; }
|
||||
void set_menubar(Menubar*);
|
||||
|
||||
private:
|
||||
virtual void event(Core::Event&) override;
|
||||
|
@ -354,7 +354,7 @@ private:
|
|||
Vector<WeakPtr<Window>> m_child_windows;
|
||||
Vector<WeakPtr<Window>> m_accessory_windows;
|
||||
|
||||
RefPtr<MenuBar> m_menubar;
|
||||
RefPtr<Menubar> m_menubar;
|
||||
|
||||
String m_title;
|
||||
Gfx::IntRect m_rect;
|
||||
|
|
|
@ -65,12 +65,12 @@ static int s_last_title_button_icons_scale;
|
|||
static Gfx::Bitmap* s_active_window_shadow;
|
||||
static Gfx::Bitmap* s_inactive_window_shadow;
|
||||
static Gfx::Bitmap* s_menu_shadow;
|
||||
static Gfx::Bitmap* s_task_bar_shadow;
|
||||
static Gfx::Bitmap* s_taskbar_shadow;
|
||||
static Gfx::Bitmap* s_tooltip_shadow;
|
||||
static String s_last_active_window_shadow_path;
|
||||
static String s_last_inactive_window_shadow_path;
|
||||
static String s_last_menu_shadow_path;
|
||||
static String s_last_task_bar_shadow_path;
|
||||
static String s_last_taskbar_shadow_path;
|
||||
static String s_last_tooltip_shadow_path;
|
||||
|
||||
static Gfx::IntRect frame_rect_for_window(Window& window, const Gfx::IntRect& rect)
|
||||
|
@ -195,7 +195,7 @@ void WindowFrame::reload_config()
|
|||
load_shadow(WindowManager::the().palette().active_window_shadow_path(), s_last_active_window_shadow_path, s_active_window_shadow);
|
||||
load_shadow(WindowManager::the().palette().inactive_window_shadow_path(), s_last_inactive_window_shadow_path, s_inactive_window_shadow);
|
||||
load_shadow(WindowManager::the().palette().menu_shadow_path(), s_last_menu_shadow_path, s_menu_shadow);
|
||||
load_shadow(WindowManager::the().palette().task_bar_shadow_path(), s_last_task_bar_shadow_path, s_task_bar_shadow);
|
||||
load_shadow(WindowManager::the().palette().taskbar_shadow_path(), s_last_taskbar_shadow_path, s_taskbar_shadow);
|
||||
load_shadow(WindowManager::the().palette().tooltip_shadow_path(), s_last_tooltip_shadow_path, s_tooltip_shadow);
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ Gfx::Bitmap* WindowFrame::window_shadow() const
|
|||
case WindowType::Tooltip:
|
||||
return s_tooltip_shadow;
|
||||
case WindowType::Taskbar:
|
||||
return s_task_bar_shadow;
|
||||
return s_taskbar_shadow;
|
||||
case WindowType::AppletArea:
|
||||
return nullptr;
|
||||
default:
|
||||
|
@ -315,7 +315,7 @@ void WindowFrame::paint_menubar(Gfx::Painter& painter)
|
|||
bool paint_as_pressed = MenuManager::the().is_open(menu);
|
||||
bool paint_as_hovered = !paint_as_pressed && &menu == MenuManager::the().hovered_menu();
|
||||
if (paint_as_pressed || paint_as_hovered) {
|
||||
Gfx::StylePainter::paint_button(painter, menu.rect_in_window_menubar(), palette, Gfx::ButtonStyle::CoolBar, paint_as_pressed, paint_as_hovered);
|
||||
Gfx::StylePainter::paint_button(painter, menu.rect_in_window_menubar(), palette, Gfx::ButtonStyle::Coolbar, paint_as_pressed, paint_as_hovered);
|
||||
}
|
||||
painter.draw_ui_text(text_rect, menu.name(), font, Gfx::TextAlignment::Center, text_color);
|
||||
return IterationDecision::Continue;
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include "Compositor.h"
|
||||
#include "EventLoop.h"
|
||||
#include "Menu.h"
|
||||
#include "MenuBar.h"
|
||||
#include "MenuItem.h"
|
||||
#include "Menubar.h"
|
||||
#include "Screen.h"
|
||||
#include "Window.h"
|
||||
#include <AK/StdLibExtras.h>
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
#include <LibGfx/Rect.h>
|
||||
#include <WindowServer/Cursor.h>
|
||||
#include <WindowServer/Event.h>
|
||||
#include <WindowServer/MenuBar.h>
|
||||
#include <WindowServer/MenuManager.h>
|
||||
#include <WindowServer/Menubar.h>
|
||||
#include <WindowServer/Window.h>
|
||||
#include <WindowServer/WindowSwitcher.h>
|
||||
#include <WindowServer/WindowType.h>
|
||||
|
|
|
@ -192,7 +192,7 @@ void WindowSwitcher::draw()
|
|||
rect_text_color = palette.threed_shadow1();
|
||||
} else {
|
||||
if (static_cast<int>(index) == m_hovered_index)
|
||||
Gfx::StylePainter::paint_button(painter, item_rect, palette, Gfx::ButtonStyle::CoolBar, false, true);
|
||||
Gfx::StylePainter::paint_button(painter, item_rect, palette, Gfx::ButtonStyle::Coolbar, false, true);
|
||||
text_color = palette.window_text();
|
||||
rect_text_color = palette.threed_shadow2();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue