summaryrefslogtreecommitdiff
path: root/Applications/FontEditor
AgeCommit message (Collapse)Author
2020-11-02Applications: Use GUI::CommonActions for save and save as menu optionsBrendan Coles
2020-10-30LibGUI: Add Widget focus policiesAndreas Kling
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.
2020-10-25LibGfx+FontEditor+Fonts: Add family, size and weight metadata to fontsAndreas Kling
This makes finding fonts from the same family much less difficult. :^)
2020-10-06FontEditor: Use new format functions.asynts
2020-10-05LibGfx+FontEditor+Fonts: Add "mean line" value to all fontsLuke
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
2020-09-20FontEditor: Draw the baseline in the glyph editor widgetTibor Nagy
2020-09-19LibGfx+FontEditor+Base: Add "baseline" value to all fontsAndreas Kling
This does nothing at the moment but will soon allow us to improve the vertical positioning of text.
2020-08-30FontEditor: Cannot take reference to local lambdaBen Wiederhake
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.
2020-08-30FontEditor: Enforce boundaries of GlyphEditorWidgetBen Wiederhake
Drawing out of bounds no longer affects any neighboring glyphs.
2020-08-01Applications: Stop setting initial window locationPeter Elliott
This will let the WindowManager choose the location of the window
2020-07-16LibWeb: Require parent window argument for MessageBoxTom
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.
2020-07-16LibGUI: Add parent window argument to FilePicker functionsTom
Since FilePicker almost always should be modal, add the parent window as mandatory first argument.
2020-07-13FontEditor: Don't add duplicate extension in Save As dialogNico Weber
2020-07-11FontEditor: Add a "Save" menu itemNico Weber
2020-07-11FontEditor: Add a "Save as..." menu itemNico Weber
2020-07-11FontEditor: Add an "Open..." menu itemNico Weber
2020-07-04LibGUI: Turn GUI::Application::the() into a pointerAndreas Kling
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.
2020-07-04LibGUI: Make GUI::Application a Core::ObjectAndreas Kling
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.
2020-06-10LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSizeAndreas Kling
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much better visual clue about what type of metric is being used.
2020-06-02FontEditor: Fix typo in commentLinus Groh
s/Ediyor/Editor/
2020-05-29Meta: Add a script check the presence of "#pragma once" in header filesEmanuele Torre
.. 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.
2020-05-21Applications: Convert 256 char font to 384 char fontHüseyin ASLITÜRK
2020-05-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-12LibGUI: Include keyboard modifier state with button on_click callsAndreas Kling
This will allow you us to implement special behavior when Ctrl+clicking a button.
2020-05-09Applications: FontEditor, relocate form items by fonts sizeHüseyin ASLITÜRK
FontEditor widget rewritten for respect to the font size and added fixed width and height header values.
2020-04-21LibGUI: Make MenuBar a Core::ObjectAndreas Kling
This makes it show up in Inspector with all the menus inside it. :^)
2020-04-04LibGUI: Add MenuBar::add_menu(name)Andreas Kling
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);
2020-03-04LibCore: Make Core::Object::add<ChildType> return a ChildType&Andreas Kling
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. :^)
2020-03-04LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clientsAndreas Kling
2020-03-03LibGUI: Remove Button& parameter from Button::on_click hookAndreas Kling
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.
2020-02-23LibGUI: Remove parent parameter to GUI::Widget constructorAndreas Kling
2020-02-23FontEditor: Fix focus and implement keyboard navigation in the glyph mapTibor Nagy
2020-02-23LibGUI: Make GUI::Frame have the 2px sunken container look by defaultAndreas Kling
The overwhelming majority of GUI::Frame users set the same appearance, so let's just make it the default.
2020-02-23Userspace: Use Core::Object::add() when building interfacesAndreas Kling
2020-02-20FontEditor: Make the application theme-awareTibor Nagy
2020-02-15LibGUI: Reduce menu-related header dependenciesAndreas Kling
2020-02-15LibGUI: Remove more header dependencies from Widget.hAndreas Kling
2020-02-14LibGUI: Remove some header dependencies from Widget.hAndreas Kling
2020-02-14LibGfx: Add forward declaration headerAndreas Kling
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
2020-02-06LibGUI: Remove leading G from filenamesAndreas Kling
2020-02-06LibGfx: Prefer using Gfx::Bitmap::load_from_file instead of load_png()Andreas Kling
Code that just wants to open a Gfx::Bitmap from a file should not be calling the PNG codec directly.
2020-02-06LibGfx: Unpublish Gfx::Rect from global namespaceAndreas Kling
2020-02-06LibGfx: Rename from LibDraw :^)Andreas Kling
2020-02-06LibDraw: Put all classes in the Gfx namespaceAndreas Kling
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. :^)
2020-02-02LibGUI: Put all classes in the GUI namespace and remove the leading GAndreas Kling
This took me a moment. Welcome to the new world of GUI::Widget! :^)
2020-01-18Meta: Add license header to source filesAndreas Kling
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.
2020-01-17Kernel: Add "accept" pledge promise for accepting incoming connectionsAndreas Kling
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.
2020-01-13Applications: Use pledge()Andreas Kling
Add some basic pledges to the following apps: - Calculator - DisplayProperties - FontEditor - HexEditor - PaintBrush
2019-12-31Applications: Implement some missing MenuBars & AboutDialogsJami Kettunen
2019-12-30FontEditor: Add glyph spacing spinboxTibor Nagy