Age | Commit message (Collapse) | Author |
|
GApplication now has a palette. This palette contains all the system
theme colors by default, and is inherited by a new top-level GWidget.
New child widgets inherit their parents palette.
It is possible to override the GApplication palette, and the palette
of any GWidget.
The Palette object contains a bunch of colors, each corresponding to
a ColorRole. Each role has a convenience getter as well.
Each GWidget now has a background_role() and foreground_role(), which
are then looked up in their current palette when painting. This means
that you no longer alter the background color of a widget by setting
it directly, rather you alter either its background role, or the
widget's palette.
|
|
|
|
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! :^)
|
|
|
|
I had to turn the tree nodes into RefCounted objects since it's not
possible to quick_sort() a Vector<OwnPtr<T>> at the moment.
|
|
Replace the boring list view with an awesome tree view :^)
|
|
Allow everything to be built from the top level directory with just
'make', cleaned with 'make clean', and installed with 'make
install'. Also support these in any particular subdirectory.
Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as
it runs.
Kernel and early host tools (IPCCompiler, etc.) are built as
object.host.o so that they don't conflict with other things built
with the cross-compiler.
|
|
The "Invert tree" checkbox was accidentally defaulted to display true when the actual tree wasn't being inverted, causing the checkbox to say the opposite of the tree state initially. This change just brings the visual indicator in line with what the code is actually doing.
|
|
Sometimes we get empty samples in a profile. I'm not sure why that
happens, but let's just ignore them for now.
|
|
Inverting the tree turns all of the innermost stack frames into roots,
allowing them to accumulate their total sample counts with other
instances of the same frame being innermost. This is an essential
feature of any cool profiler, and now we have it. :^)
|
|
|
|
From a nice suggestion by Nagy Tibor. :^)
|
|
Only do the conversion from JSON once. This makes it much faster to do
time range filtering with the timeline widget. :^)
|
|
Saw this copy-paste mistake in the ProfileViewer Timeline video
|
|
Instead of fetching these from JSON in every paint event, we now have a
separate "SampleData" vector that can be iterated.
This optimization was made possible by profiling ProfileViewer and then
analyzing the profile with ProfileViewer! :^)
|
|
You can now select the time range you want on the profile timeline.
The tree view will update automatically as you alter the range.
Unfortunately this causes the treeview to collapse all of its nodes.
It would be nice to solve this somehow in the future so that nodes
can stay open.
|
|
Userspace stack frames are in blue, kernel stack frames in red :^)
|
|
|
|
|
|
Put the sample count into a separate column. This is so neat :^)
|
|
We were forgetting to call ProfileNode::add_child() which is how the
parent node pointer gets set. This fixes the weird looking GTreeView.
|
|
We begin with a simple treeview that shows a recorded profile.
To record and view a profile of a process with <PID>, simply do this:
$ profile <PID> on
... wait while PID does something interesting ...
$ profile <PID> off
$ cat /proc/profile > my-profile.prof
$ ProfileViewer my-profile.prof
|
|
Make the results of a "find in files" operation look a lot nicer by
presenting them in a table format, instead of in a single-column list.
Since we don't yet support rich text in table view cells, use the
marker glyphs in the system default fixed-width font to show where the
matched text begins and ends on the line we found it on. :^)
|
|
This is primarily to make it possible to pass a GMenu* where a CObject*
is expected.
|
|
Using int was a mistake. This patch changes String, StringImpl,
StringView and StringBuilder to use size_t instead of int for lengths.
Obviously a lot of code needs to change as a result of this.
|
|
Hogging "id" and "name" makes it impossible to use these as message
parameter names, which seems silly. :^)
|
|
This patch introduces code generation for the WindowServer IPC with
its clients. The client/server endpoints are defined by the two .ipc
files in Servers/WindowServer/: WindowServer.ipc and WindowClient.ipc
It now becomes significantly easier to add features and capabilities
to WindowServer since you don't have to know nearly as much about all
the intricate paths that IPC messages take between LibGUI and WSWindow.
The new system also uses significantly less IPC bandwidth since we're
now doing packed serialization instead of passing fixed-sized structs
of ~600 bytes for each message.
Some repaint coalescing optimizations are lost in this conversion and
we'll need to look at how to implement those in the new world.
The old CoreIPC::Client::Connection and CoreIPC::Server::Connection
classes are removed by this patch and replaced by use of ConnectionNG,
which will be renamed eventually.
Goodbye, old WindowServer IPC. You served us well :^)
|
|
not end.
CppLexer expected that `/*` always has `*/` at the end. This PR
fixes the issue and assumes the rest of file is a comment.
|
|
Previously it was not possible to see what each thread in a process was
up to, or how much CPU it was consuming. This patch fixes that.
SystemMonitor and "top" now show threads instead of just processes.
"ps" is gonna need some more fixing, but it at least builds for now.
Fixes #66.
|
|
This moves all of the browser networking to ProtocolServer.
|
|
|
|
Also refactor the token pair matching code a little bit to not repeat
ourselves so much. :^)
|
|
Client-side connection objects must now provide both client and server
endpoint types. When a message is received from the server side, we try
to decode it using both endpoint types and then send it to the right
place for handling.
This now makes it possible for AudioServer to send unsolicited messages
to its clients. This opens up a ton of possibilities :^)
|
|
While you are typing in HackStudio, we re-lex the C++ as you type,
so this means we also need to keep re-checking for matching curlies and
parentheses at the cursor.
Fixes #769 (although it's not optional, because it's too cool. :^)
|
|
This can just piggyback on the code I just wrote for curly braces.
|
|
This works for C++ syntax highlighted text documents by caching the C++
token type in a new "arbitrary data" member of GTextDocumentSpan.
When the cursor is placed immediately before a '{' or immediately after
a '}', we highlight both of these brace buddies by changing their
corresponding spans to have a different background color.
..and spans can also now have a custom background color. :^)
|
|
This returns the rectangle between two given Points. Thanks Owlinator
for suggesting this much easier way of doing it :^)
|
|
I originally put it in FormWidget because CursorTool was clueless about
painting. This patch adds Tool::on_second_paint() which allows all the
tools to hook into the second paint pass.
|
|
Make use of the new alpha support in Painter::fill_rect() to fill the
rubber band with some see-through color. :^)
|
|
This patch implements basic rubber-banding. Perhaps this mechanism can
be generalized somehow, but it's not clear to me how that would work
at the moment.
|
|
This makes Ctrl+Left/Right jump over whitespace, which feels nice :^)
|
|
Also give the Run action a different icon that has the same style
as the stop icon that's now alongside it.
Closes https://github.com/SerenityOS/serenity/issues/771
|
|
The Shell also puts each command into its own process group,
which interferes with us trying to do the same here. We don't
really need the shell here anyway, but it means we'll have to
do command splitting ourselves.
|
|
Also put our child process into a new process group in order to be
able to kill it along with its own children.
|
|
|
|
This patch adds pthread_create() and pthread_exit(), which currently
simply wrap our existing create_thread() and exit_thread() syscalls.
LibThread is also ported to using LibPthread.
|
|
The pseudoterminal *master* fd is not supposed to be inherited,
so make sure to open it with O_CLOEXEC.
|
|
You can now manipulate the widget selection either by clicking and
dragging the widgets using the cursor tool, or by interacting with
the form widget tree view. :^)
|
|
This patch introduces a simple WidgetTreeModel that models the widget
tree inside of a given root GWidget.
|
|
This way you can see which tool you've currently got selected, and it
doesn't let you select more than one at once.
|