Commit Graph

14 Commits

Author SHA1 Message Date
Simon Wanner
206d6ece55 LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
kleines Filmröllchen
7af87e8e6b SystemMonitor: Move process window to GML
Extra stuff done in this commit to facilitate the above (if you want to
really push my commit count, ask for more atomicisation):
- Register a bunch of widgets that are used in the process window.
- Allow setting the pid after the fact for the process state widget.
2022-04-03 12:21:05 +02:00
thankyouverycool
0e56dd4917 SystemMonitor: Don't invalidate ProcessStateModel on refresh
The model has a fixed number of rows based on the column enum
and shouldn't need to be invalidated every update.
2022-02-18 13:10:37 +01:00
Lenny Maiorani
160bda7228 Applications: Use default constructors/destructors
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-02-14 22:06:55 +00:00
Sam Atkins
eefe471dce SystemMonitor: Remove unused SortingProxyModel include 2021-12-24 05:11:52 -08:00
sin-ack
e11d177618 Userland+LibGUI: Add shorthand versions of the Margins constructor
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same
margin on all edges, for example. The constructors follow CSS' style of
specifying margins. The added constructors are:

- Margins(int all): Sets the same margin on all edges.
- Margins(int vertical, int horizontal): Sets the first argument to top
  and bottom margins, and the second argument to left and right margins.
- Margins(int top, int vertical, int bottom): Sets the first argument to
  the top margin, the second argument to the left and right margins,
  and the third argument to the bottom margin.
2021-08-18 10:30:50 +02:00
sin-ack
ca2c81251a Everywhere: Replace Model::update() with Model::invalidate()
Most of the models were just calling did_update anyway, which is
pointless since it can be unified to the base Model class. Instead, code
calling update() will now call invalidate(), which functions identically
and is more obvious in what it does.

Additionally, a default implementation is provided, which removes the
need to add empty implementations of update() for each model subclass.

Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
2021-08-06 19:14:31 +02:00
sin-ack
eb6cf00c0e SystemMonitor: Register ProcessStateModel with ProcessModel on construct
Since this was missing, ProcessStateModel never received
model_did_update, and it was possible for the ProcessModel index to go
stale and show another process.

Fixes #9129.
2021-08-01 19:26:07 +04:30
Andreas Kling
6a012ad79f LibGfx: Remove Gfx::FontDatabase::default_bold_font()
Instead use default_font().bold_variant() in cases where we want a bold
variant of the default font. :^)
2021-05-20 20:55:29 +02:00
Andreas Kling
ef09f9c825 SystemMonitor: Make sure we set a model before changing column sizes
Changing a view's column metadata requires that a model is set.
2021-05-15 00:50:51 +02:00
Andreas Kling
3d4afe7614 Everywhere: "indexes" => "indices"
I've wasted a silly amount of time in the past fretting over which
of these words to use. Let's just choose one and use it everywhere. :^)
2021-04-29 22:23:52 +02:00
Andreas Kling
b91c49364d AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
2021-04-23 16:46:57 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
e43fba0c58 SystemMonitor: Add tab with detailed state to process properties window
This is done using a wrapper model that transforms all the information
about a single process in the ProcessModel and turns it into a 2-column
table model with only that process in it.
2021-04-11 13:24:59 +02:00