summaryrefslogtreecommitdiff
path: root/Applications/Calculator
AgeCommit message (Collapse)Author
2021-01-12Applications: Move to Userland/Applications/Andreas Kling
2021-01-04Everywhere: Use GUI::CommonActions::make_about_action()Andreas Kling
2021-01-03Calculator: Port interface to GML (#4742)Glenford Williams
2020-12-30LibGFX: Move default_xxx_font() methods from Font to FontDatabaseStephan Unverwerth
When we have an abstract font class it makes no sense to keep these methods in the Font class.
2020-12-21Build: Embed application icons directly in the executables.William Marlow
New serenity_app() targets can be defined which allows application icons to be emedded directly into the executable. The embedded icons will then be used when creating an icon for that file in LibGUI.
2020-11-23Calculator: Changed 'CE' Button from 'Clear Error' To 'Clear Entry'Zac
The CE button on the windows calculator was used to clear the current entry rather than the current error. This commit changes the calculator's CE button such that it now clears the current value being entered into the keypad and errors are now cleared at the end of every successful operation.
2020-11-02Applications: Use GUI::Icon::default_icon to set application iconBrendan Coles
2020-10-05Calculator: Use format instead of printf.asynts
This also fixes a graphical bug where the decimal point was always rendered. The number four was represented as '4.' instead of '4'. Now the decimal point is only shown when there are decimal places.
2020-10-03Everywhere: Fix more typosLinus Groh
2020-08-01Applications: Stop setting initial window locationPeter Elliott
This will let the WindowManager choose the location of the window
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-02Calculator: Set text color through the paletteSergey Bugaev
Unfortunately, this means the Calculator won't pick up system theme changes dynamically. Fixes https://github.com/SerenityOS/serenity/issues/1077
2020-05-18Calculator: Set a fixed-width font on the text boxAndreas Kling
GUI::TextEditor does not yet support right-aligned variable-width fonts so just switch this to a fixed-width font for now.
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-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-03LibGUI: Some more convenience functions for constructing widgetsAndreas Kling
This patch adds two new API's: - WidgetType& GUI::Window::set_main_widget<WidgetType>(); This creates a new main widget for a window, assigns it, and returns it to you as a WidgetType&. - LayoutType& GUI::Widget::set_layout<LayoutType>(); Same basic idea, creates a new layout, assigns it, and returns it to you as a LayoutType&.
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-23Userspace: Use Core::Object::add() when building interfacesAndreas Kling
2020-02-16LibGUI: Add forwarding headerAndreas Kling
This patch adds <LibGUI/Forward.h> and uses it a bunch. It also dragged various header dependency reduction changes into it.
2020-02-15LibGUI: Reduce menu-related header dependenciesAndreas Kling
2020-02-14LibGfx: Add forward declaration headerAndreas Kling
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
2020-02-10Calculator: Accept more keyboard input (#1207)ignas-sa
Allow user to clear/remove last numeral from input (Esc/Backspace respectively) and type the decimal point.
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: 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-24Meta: Claim copyright for files created by meSergey Bugaev
This changes copyright holder to myself for the source code files that I've created or have (almost) completely rewritten. Not included are the files that were significantly changed by others even though it was me who originally created them (think HtmlView), or the many other files I've contributed code to.
2020-01-21Calculator: Use unveil()Andreas Kling
A barebones GUI app like this only needs read access to /res (for fonts and themes, in case settings change) once it's up and running.
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-18Calculator: Added keyboard inputrhin123
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-25Build: support library and generator dependenciesjoshua stein
Instead of directly manipulating LDFLAGS, set LIB_DEPS in each subdirectory Makefile listing the libraries needed for building/linking such as "LIB_DEPS = Core GUI Draw IPC Core". This adds each library as an -L and -l argument in LDFLAGS, but also adds the library.a file as a link dependency on the current $(PROGRAM). This causes the given library to be (re)built before linking the current $(PROGRAM), but will also re-link any binaries depending on that library when it is modified, when running make from the root directory. Also turn generator tools like IPCCompiler into dependencies on the files they generate, so they are built on-demand when a particular directory needs them. This all allows the root Makefile to just list directories and not care about the order, as all of the dependency tracking will figure it out.
2019-12-20Build: clean up build system, use one shared Makefilejoshua stein
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.
2019-11-29Calculator: Add a 16x16 app iconAndreas Kling
2019-09-22LibCore: Remove ObjectPtr in favor of RefPtrAndreas Kling
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
2019-09-21LibGUI: Convert custom widgets and subclasses to ObjectPtrAndreas Kling
2019-09-21Calculator: Convert to using ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GWindow to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GTextBox, GTextEditor and GResizeCorner to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GLabel to ObjectPtrAndreas Kling
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-08-10Calculator: Add a simple calculator appSergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/319