Age | Commit message (Collapse) | Author |
|
|
|
Every widget now has a GUI::FocusPolicy that determines how it can
receive focus:
- NoFocus: The widget is not focusable (default)
- TabFocus: The widget can be focused using the tab key.
- ClickFocus: The widget can be focused by clicking on it.
- StrongFocus: Both of the above.
For widgets that have a focus proxy, getting/setting the focus policy
will affect the proxy instead.
|
|
This makes finding fonts from the same family much less difficult. :^)
|
|
|
|
The main inspiration behind this was to have a correct ex CSS unit.
The mean line is based off what it shows in the CSS Values and Units
Level 4 specification, section 6.1.1.
https://www.w3.org/TR/css-values-4/#font-relative-lengths
|
|
|
|
This does nothing at the moment but will soon allow us to improve the
vertical positioning of text.
|
|
Under the hood, a lambda is just a struct full of pointers/references/copies and whatever else
the compiler deems necessary. In the case of 'update_demo', the struct lives on the stack
frame of FontEditorWidget::FontEditorWidget(). Hence it is still alive when it's called
during the constructor.
However, when 'fixed_width_checkbox.on_checked' fires, that stack frame is no longer alive,
and thus the *reference* to the (struct of) the lambda is invalid\! This meant that
'update_demo' silently read invalid data, tried to call '.update()' on some innocent arbitrary
memory address, and it crashed somewhere unrelated.
Passing 'update_demo' by value (like with all the other event handlers) fixes this issue.
Note that this solution only works because 'update_demo' itself has no state; otherwise
the various copies of 'update_demo' might notice that they are, in fact, independent copies
of the original lambda. But that doesn't matter here.
|
|
Drawing out of bounds no longer affects any neighboring glyphs.
|
|
This will let the WindowManager choose the location of the window
|
|
Since the vast majority of message boxes should be modal, require
the parent window to be passed in, which can be nullptr for the
rare case that they don't. By it being the first argument, the
default arguments also don't need to be explicitly stated in most
cases, and it encourages passing in a parent window handle.
Fix up several message boxes that should have been modal.
|
|
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
|
|
|
|
|
|
|
|
|
|
During app teardown, the Application object may be destroyed before
something else, and so having Application::the() return a reference was
obscuring the truth about its lifetime.
This patch makes the API more honest by returning a pointer. While
this makes call sites look a bit more sketchy, do note that the global
Application pointer only becomes null during app teardown.
|
|
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
|
|
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
|
|
s/Ediyor/Editor/
|
|
.. and make travis run it.
I renamed check-license-headers.sh to check-style.sh and expanded it so
that it now also checks for the presence of "#pragma once" in .h files.
It also checks the presence of a (single) blank line above and below the
"#pragma once" line.
I also added "#pragma once" to all the files that need it: even the ones
we are not check.
I also added/removed blank lines in order to make the script not fail.
I also ran clang-format on the files I modified.
|
|
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|
|
This will allow you us to implement special behavior when Ctrl+clicking
a button.
|
|
FontEditor widget rewritten for respect to the font size and added fixed width and height header values.
|
|
This makes it show up in Inspector with all the menus inside it. :^)
|
|
This allows us to construct menus in a more natural way:
auto& file_menu = menubar->add_menu("File");
file_menu.add_action(...);
Instead of the old way:
auto file_menu = GUI::Menu::construct();
file_menu->add_action(...);
menubar->add_menu(file_menu);
|
|
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
|
|
|
|
There was but a single user of this parameter and it's a bit tedious
to write it out every time, so let's get rid of it.
|
|
|
|
|
|
The overwhelming majority of GUI::Frame users set the same appearance,
so let's just make it the default.
|
|
|
|
|
|
|
|
|
|
|
|
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
|
|
|
|
Code that just wants to open a Gfx::Bitmap from a file should not be
calling the PNG codec directly.
|
|
|
|
|
|
I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
|
|
This took me a moment. Welcome to the new world of GUI::Widget! :^)
|
|
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
|
|
This patch adds a new "accept" promise that allows you to call accept()
on an already listening socket. This lets programs set up a socket for
for listening and then dropping "inet" and/or "unix" so that only
incoming (and existing) connections are allowed from that point on.
No new outgoing connections or listening server sockets can be created.
In addition to accept() it also allows getsockopt() with SOL_SOCKET
and SO_PEERCRED, which is used to find the PID/UID/GID of the socket
peer. This is used by our IPC library when creating shared buffers that
should only be accessible to a specific peer process.
This allows us to drop "unix" in WindowServer and LookupServer. :^)
It also makes the debugging/introspection RPC sockets in CEventLoop
based programs work again.
|
|
Add some basic pledges to the following apps:
- Calculator
- DisplayProperties
- FontEditor
- HexEditor
- PaintBrush
|
|
|
|
|