ladybird/Libraries/LibCore
Andreas Kling 411058b2a3 WindowServer+LibGUI: Implement basic color theming
Color themes are loaded from .ini files in /res/themes/
The theme can be switched from the "Themes" section in the system menu.

The basic mechanism is that WindowServer broadcasts a SharedBuffer with
all of the color values of the current theme. Clients receive this with
the response to their initial WindowServer::Greet handshake.

When the theme is changed, WindowServer tells everyone by sending out
an UpdateSystemTheme message with a new SharedBuffer to use.

This does feel somewhat bloated somehow, but I'm sure we can iterate on
it over time and improve things.

To get one of the theme colors, use the Color(SystemColor) constructor:

    painter.fill_rect(rect, SystemColor::HoverHighlight);

Some things don't work 100% right without a reboot. Specifically, when
constructing a GWidget, it will set its own background and foreground
colors based on the current SystemColor::Window and SystemColor::Text.
The widget is then stuck with these values, and they don't update on
system theme change, only on app restart.

All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-23 20:33:01 +01:00
..
CArgsParser.cpp LibCore: Fix a crash in CArgsParser 2019-08-17 12:07:55 +02:00
CArgsParser.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
CConfigFile.cpp WindowServer+LibGUI: Implement basic color theming 2019-12-23 20:33:01 +01:00
CConfigFile.h WindowServer+LibGUI: Implement basic color theming 2019-12-23 20:33:01 +01:00
CDirIterator.cpp CDirIterator: Fix another instance of StringView::characters() misuse. 2019-07-08 14:03:19 +02:00
CDirIterator.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
CElapsedTimer.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CElapsedTimer.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CEvent.cpp LibCore+LibGUI: Allow inserting a CObject/GWidget before another 2019-11-05 20:41:27 +01:00
CEvent.h LibCore+LibGUI: Allow inserting a CObject/GWidget before another 2019-11-05 20:41:27 +01:00
CEventLoop.cpp LibCore: Assert instead of crashing in CEventLoop::current() 2019-11-26 19:58:25 +01:00
CEventLoop.h LibCore: Added unquit() method to CEventLoop. 2019-10-25 15:29:19 +02:00
CFile.cpp LibCore: Make CFile::open() truncate when opening something "WriteOnly" 2019-11-26 14:32:59 +01:00
CFile.h LibCore: Convert CFile to ObjectPtr 2019-09-21 20:50:06 +02:00
CGzip.cpp LibCore: Move puff() from LibDraw to LibCore 2019-11-23 23:43:37 +01:00
CGzip.h LibCore: Rename class Gzip -> CGZip 2019-11-10 12:52:23 +01:00
CHttpJob.cpp LibCore: Silence some aggressive CSocket and CHttpJob debug spam 2019-12-14 11:30:18 +01:00
CHttpJob.h LibCore: Make CHttpJob::response() return a CHttpResponse* 2019-12-10 20:46:33 +01:00
CHttpRequest.cpp LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CHttpRequest.h LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CHttpResponse.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CHttpResponse.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
CIODevice.cpp ByteBuffer: Remove pointer() in favor of data() 2019-09-30 08:57:01 +02:00
CIODevice.h CIODevice: Add is_open() 2019-09-04 15:13:55 +02:00
CIODeviceStreamReader.h LibCore: Rename CFileStreamReader => CIODeviceStreamReader. 2019-07-30 15:16:39 +02:00
CLocalServer.cpp SystemServer+LibCore: Implement socket takeover 2019-11-26 19:58:25 +01:00
CLocalServer.h SystemServer+LibCore: Implement socket takeover 2019-11-26 19:58:25 +01:00
CLocalSocket.cpp CSocket: Don't create the read notifier until after we've connected 2019-09-22 21:46:46 +02:00
CLocalSocket.h LibCore: Convert CLocalSocket to ObjectPtr 2019-09-21 15:25:08 +02:00
CNetworkJob.cpp LibCore: Have CNetworkJob protect itself during the on_finish callback 2019-11-23 21:42:02 +01:00
CNetworkJob.h LibCore: Make it possible to cancel pending CNetworkJobs 2019-09-21 17:32:26 +02:00
CNetworkResponse.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CNetworkResponse.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CNotifier.cpp LibCore: Make CSocket's notifiers into children of the CSocket 2019-08-18 11:54:39 +02:00
CNotifier.h LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CObject.cpp LibCore+LibGUI: Allow inserting a CObject/GWidget before another 2019-11-05 20:41:27 +01:00
CObject.h LibCore+LibGUI: Allow inserting a CObject/GWidget before another 2019-11-05 20:41:27 +01:00
CProcessStatisticsReader.cpp SystemMonitor: Show information about purgeable memory 2019-12-09 19:16:58 +01:00
CProcessStatisticsReader.h SystemMonitor: Show information about purgeable memory 2019-12-09 19:16:58 +01:00
CSocket.cpp LibCore: Silence some aggressive CSocket and CHttpJob debug spam 2019-12-14 11:30:18 +01:00
CSocket.h CSocket: Don't create the read notifier until after we've connected 2019-09-22 21:46:46 +02:00
CSocketAddress.h LibCore: Initialise m_port as zero in CSocketAddress 2019-08-06 15:06:20 +02:00
CSyscallUtils.h LibCore: Improve logging of errors in safe_syscall() somewhat 2019-12-01 16:47:28 +01:00
CTCPServer.cpp LibCore: Make CTCPServer's local address/port getters return Optionals 2019-11-04 13:07:41 +01:00
CTCPServer.h LibCore: Make CTCPServer's local address/port getters return Optionals 2019-11-04 13:07:41 +01:00
CTCPSocket.cpp CSocket: Don't create the read notifier until after we've connected 2019-09-22 21:46:46 +02:00
CTCPSocket.h LibCore: Convert CTCPSocket to ObjectPtr, add construct() helper 2019-09-21 15:25:08 +02:00
CTimer.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
CTimer.h LibCore: Remove ObjectPtr in favor of RefPtr 2019-09-22 00:31:54 +02:00
CUserInfo.cpp LibCore: Make get_current_user_home_path() return String & close passwd 2019-08-03 08:32:07 +02:00
CUserInfo.h AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
Makefile Build: clean up build system, use one shared Makefile 2019-12-20 20:20:54 +01:00
puff.c LibCore: Move puff() from LibDraw to LibCore 2019-11-23 23:43:37 +01:00
puff.h LibCore: Move puff() from LibDraw to LibCore 2019-11-23 23:43:37 +01:00