summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-07-20LibLine: Avoid excessive write() syscalls when refreshing the displayAli Mohammad Pur
Previously, we were generating the display update one character at a time, and writing them one at a time to stderr, which is not buffered, doing so caused one syscall per character printed which is s l o w (TM) This commit makes LibLine write the update contents into a buffer, and flush it after all the update is generated :^)
2021-07-20LibLine: Reset the suggestion page offset when finding the max lengthAli Mohammad Pur
Otherwise, something like shift+tab->tab->tab will mess up the page contents (assuming that the max lengths in the pages are different).
2021-07-20LibGUI: Add Ctrl-U to insert modeAriel Don
While under insert mode, Ctrl-U deletes all characters between the first non-blank character of the line and the cursor. Implement delete_from_line_start_to_cursor() in TextEditor. Then, call the method in VimEditingEngine via its pointer to an instance of TextEditor.
2021-07-20LibGUI: Add Ctrl-H to insert modeAriel Don
In Vim, Ctrl-H is effectively equivalent to backspace in insert mode, as it deletes the previous character. This commit implements method delete_previous_char() to TextEditor. delete_char() already exists in EditingEngine, but it deletes the next character rather than the previous. delete_previous_char() is then called from within VimEditingEngine.
2021-07-20LibGUI: Add Ctrl-W to insert modeAriel Don
In Vim's insert mode, Ctrl-W deletes the word before the cursor, like Ctrl-Backspace. Unlike Ctrl-Backspace, if only whitespace exists between the end of the word and the cursor, the word will be deleted with the whitespace. To do so, this commit introduces two methods: delete_previous_word() for TextEditor and first_word_before() for TextDocument, where the former depends on the latter. delete_previous_word() is then called in VimEditingEngine.
2021-07-20Taskbar: Update the start button width when system fonts changeAndreas Kling
2021-07-20LibTTF+LibGfx: Make Gfx::Font::bold_variant() work for TTF fontsAndreas Kling
There's no need for this to be a virtual, it's just a font database lookup and can be done in the Font base class.
2021-07-20LibTTF+LibGfx: Improve vertical alignment of glyphsAndreas Kling
Before this patch, some glyphs had a weird off-by-1 vertical position which looked really jarring at small font sizes. This was caused by glyph bitmaps having different heights from each other. (Each glyph bitmap was minimally sized to fit only the glyph itself, and then vertically positioned during the paint phase. Since this vertical positioning was integer based, subpixel precision was lost and things ended up looking wonky.) Fix this by making all glyph bitmaps be the same height so we can blit them at the same integer y position. We use the typographic ascent from the OS/2 table to transform the glyph coordinates. The end result is a huge improvement visually. :^)
2021-07-20LibTTF: Parse OS/2 tablesAndreas Kling
The OS/2 table contains nice typographic ascent/descent information.
2021-07-20LibTTF: Don't choke on fonts with CompositeGlyfFlags::UseMyMetricsAndreas Kling
This was preventing us from loading JetBrains Mono Regular with LibTTF.
2021-07-20LibTTF: Minor const correctness fix in TTF rasterizerAndreas Kling
2021-07-20LibTTF: Propagate glyph bitmap allocation failure in rasterizerAndreas Kling
2021-07-20LibTTF: Rename "raster" => "rasterize"Andreas Kling
2021-07-20LibTTF: Convert code to east-const styleAndreas Kling
2021-07-20Taskbar: Launch apps in Terminal when RunInTerminal=true is specifiedLinus Groh
This feels a bit awkward right now, and needs code duplication - I think adding a mechanism to the AppFile class to run the executable would be neat, especially if we add an arguments field to app files - but this will do for now.
2021-07-20LibDesktop: Add a RunInTerminal boolean field to app filesLinus Groh
This is common enough to warrant its own setting by now - but it's also partially a workaround. Since app files currently only support a single executable path with no arguments, we resort to generating wrapper scripts for port launchers with arguments - and then the executable is that shell script. We also moved from manually specifying icon files to embedding them in executables. As shell scripts can't have icons embedded in them, a different solution is needed - this one solves the common case of running a CLI program in a terminal, and still allows embedding of icons in the executable itself as no shell script is needed, meaning it will be shown in the taskbar and system menu. The second use case of actually passing arguments to the executable itself (and not just "Terminal -e ...") is not covered by this and still requires an external script (meaning no icon for now), but I think that can easily be solved by adding something like an "Arguments" field to app files. :^)
2021-07-20Help: Add check for pushing current page to historyroepfeli
2021-07-20Pong: Disable resizing the windowKarol Kosek
The game doesn't handle resize events. It's a pretty lazy fix. The proper way would be to actually allow the game to be resized, with some scaling trickery, but most games here don't do that anyway, so I guess that's good enough.
2021-07-19Revert "Profiler: Configure the TimelineContainer to be shrink to fit"Brian Gianforcaro
This reverts commit cfef3040fb00127552158f233ebe4705bf242c25. It looks like although this does improve things, it also degrades the experience and messes with the usability, especially for large amounts of processes. Need to come back to this with a more holistic fix.
2021-07-19Applets: Add DesktopPicker appletPeter Elliott
This applet displays a grid of desktops, and shows the user what virtual desktop they are on. When clicked, the desktop will be changed.
2021-07-19WindowServer: Add set_virtual_dekstop WindowManager messagePeter Elliott
Users can specify the row and column of the virtual desktop, and WindowServer will animate to it.
2021-07-19LibGUI: Add callback for screen rect change to Desktop.hPeter Elliott
callbacks for screen rect changes can be added with on_receive_screen_rects()
2021-07-19File Manager: Differentiate between navigation and rename errorsls
Adds a new on_rename_error handler and renames the old on_error handler to on_directory_change_error in FileSystemModel. The on_rename_error handler creates a MessageDialog with the error message.
2021-07-19Assistant: Trim terminal command before displaying or running itLuK1337
2021-07-19LibGUI: Call did_update() from AutocompleteSuggestionModel::update()Itamar
This fixes an issue where the column widths of the AutocompleteBox did not properly update after update_suggestions() was called.
2021-07-19LibGUI: Remove column width limitation in AutocompleteProviderItamar
2021-07-19LibC: Add stub for iswprintKenneth Myhra
Without the declaration of iswprint libarchive will not compile.
2021-07-19LibGUI: Tighten invalidation rect for TabWidgetMarcus Nilsson
Previously the whole bar was repainted, there's no need to invalidate past the last tab button.
2021-07-19LibGUI: Don't invalidate scrollbar rect if disabledMarcus Nilsson
No need to repaint if it's not scrollable, this saves a tiny bit of repaint :)
2021-07-19LibWeb: Implement justify-content for the FlexFormattingContextTobias Christiansen
This patch implements the algorithm for placing flex-items on a line according to the specified justify-content property.
2021-07-19LibWeb: Add parsing for the justify-content propertyTobias Christiansen
2021-07-19Everywhere: Use AK/Math.h if applicableHendiadyoin1
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage.
2021-07-19AK: Introduce Math.hHendiadyoin1
This is to implement constexpr template based implementations for mathematical functions This also changes math.cpp to use these implementations. Also adds a fastpath for floating point trucation for values smaller than the signed 64 bit limit.
2021-07-19SoundPlayer: Fix a spelling mistake in a variable nameGunnar Beutner
2021-07-19Applets: Add tooltip for Clipboard Historybrapru
2021-07-19SoundPlayer: End M3U tag names with a colonKarol Kosek
2021-07-19SoundPlayer: Clear M3U track metadata after parsed fileKarol Kosek
Before this change, the track metadata was duplicated over and over until it was overwritten.
2021-07-19WindowServer: Fix crash rendering fullscreen windowTom
Fixes #8869
2021-07-19LibJS: Implement Temporal.PlainDate.prototype.calendarIdan Horowitz
2021-07-19LibJS: Implement Temporal.PlainDate.prototype[@@toStringTag]Idan Horowitz
2021-07-19LibJS: Start implementing Temporal.PlainDateIdan Horowitz
This commit adds the PlainDate object itself, its constructor and prototype (currently empty), and several required abstract operations.
2021-07-19LibCrypto: Add operator<= and operator>= to SignedBigIntegerIdan Horowitz
2021-07-19LibTest/Utilities: Add method for TestRunner to print failed test namesAndrew Kaster
If a test run has a lot of tests in it, and they fill up the terminal buffer, it can be difficult to find out exactly which tests have failed from your large test run. Make TestRunner print out an optional Vector of failed test names at the end of the run, and have run-tests add each failed or crashed test to a Vector it uses for this purpose.
2021-07-19LibJS: Rename Temporal.now => Temporal.NowLinus Groh
See: - https://github.com/tc39/proposal-temporal/commit/d0acb66 - https://github.com/tc39/proposal-temporal/commit/0097fdd
2021-07-19LibJS: Reflect recent editorial changes in the Temporal proposalLinus Groh
See: - https://github.com/tc39/proposal-temporal/commit/2148441 - https://github.com/tc39/proposal-temporal/commit/08c04cc - https://github.com/tc39/proposal-temporal/commit/b77da58
2021-07-19LibJS: Implement Temporal.Duration.from()Linus Groh
...with ParseTemporalDurationString currently TODO()'d.
2021-07-19LibJS: Fix TemporalDurationLike property orderLinus Groh
The table is sorted alphabetically and supposed to be iterated in that oder. Also move this to a templated lambda for later re-use with different target structs and value types.
2021-07-19LibJS: Move Temporal AO structs/enum classes above function declarationsLinus Groh
This is a bit closer to our usual style, and tidier.
2021-07-18WindowServer: Fix menu over-drawingTom
We only need to re-draw the item being selected and the item being deselected. We also don't care anymore if applets were added or removed as we no longer have a global menu bar.
2021-07-18Everywhere: Make tracking cpu usage independent from system ticksTom
This switches tracking CPU usage to more accurately measure time in user and kernel land using either the TSC or another time source. This will also come in handy when implementing a tickless kernel mode.