Commit Graph

1875 Commits

Author SHA1 Message Date
Sam Atkins
38bb9afea8 Browser: Don't crash when selecting nothing in the Inspector DOM tree 2022-03-11 19:31:59 +01:00
Sam Atkins
0326ad34df Browser+LibWeb+WebContent: Show style for pseudo-elements :^)
This expands the InspectorWidget::Selection to include an optional
PseudoElement, which is then passed over IPC to request style
information for it.

As noted, this has some pretty big limitations because pseudo-elements
don't have DOM nodes:
- Declared style has to be recalculated when it's requested.
- We don't display the computed style.
- We don't display custom properties.
2022-03-10 17:30:09 +01:00
Sam Atkins
2c970b9516 Browser: Replace inspector's dom_node_id with a Selection struct 2022-03-10 17:30:09 +01:00
Ben Abraham
7594350376 Browser: Show currently loading host and remaining resource count 2022-03-10 00:51:05 +01:00
Tobias Christiansen
51be2283f5 PixelPaint: Support saving/loading masks to project file 2022-03-09 17:15:17 +01:00
Tobias Christiansen
0dd5f5672c PixelPaint: Rename typo'ed BMPWriter in serialize_as_json() 2022-03-09 17:15:17 +01:00
Tobias Christiansen
937785f6c1 PixelPaint: Fix saving project
Some json objects didn't get finished, so it crashed.
2022-03-09 17:15:17 +01:00
u9g
c8803afe3e Spreadsheet: Add CommonRange#unique() 2022-03-09 10:22:20 +03:30
u9g
b9d44eb022 Spreadsheet: Add SplitRange class and CommonRange#filter 2022-03-09 10:22:20 +03:30
kimlintu
a4e3ae0ee9 Help: Remove redundant selection update when opening page
Since the selection already gets updated in AbstractView::keydown_event
and AbstractView::mousedown_event we don't have to update it again in
the MainWidget::open_url function.

This fixes a bug that causes the selection to "spaz out" when
scrolling too fast between pages.
2022-03-08 23:34:45 +01:00
javabird25
67d10a50ee Spreadsheet: Fix overridden max length related crash
NumericCell::display() attempted to take a substring of cell contents
according to the "Override max length" parameter,
but it did not account for the actual string length.
2022-03-09 01:05:12 +03:30
Vrins
39a5076f40 Browser+LibWeb: Add an Element size preview widget to inspector
This Adds an element size preview widget to the inspector widget
in a new tab. This functions similar to chrome and firefox and
shows the margin, border, padding, and content size of the selected
element in the inspector.

The colors for the size preview widget are taken from the chrome
browser.
2022-03-08 22:09:52 +01:00
Vrins
3b22fd9a9f LibGfx: Add support for TextAlignment::TopCenter / BottomCenter
Now supports TextAlignment::TopCenter and TextAlignment::BottomCenter
for the Painter::draw_text.

Also patched this in Spreadsheet/CellTypeDialog.cpp
2022-03-08 22:09:52 +01:00
Tobias Christiansen
ebbf977be5 PixelPaint: Draw a colored border around the appropriate thumbnail
According to the edited Bitmap of a Layer, give visual feedback by
drawing a fancy border around the Bitmap in question.
2022-03-08 22:07:12 +01:00
Tobias Christiansen
8b0bd665ec PixelPaint: Add "Add Mask" to Layer context menu 2022-03-08 22:07:12 +01:00
Tobias Christiansen
4b1c31bb36 PixelPaint: Change EditMode of Layer when double clicking on thumbnail 2022-03-08 22:07:12 +01:00
Tobias Christiansen
57772f9708 PixelPaint: Add a mask thumbnail to the LayerListWidget 2022-03-08 22:07:12 +01:00
Tobias Christiansen
f972f8e7a8 PixelPaint: Use the currently_edited_bitmap in the Tools
This way, you can actually edit the mask of a Layer!
2022-03-08 22:07:12 +01:00
Tobias Christiansen
96829565d8 PixelPaint: Keep track of and expose the type of the edited bitmap
This can be either the content bitmap or the mask bitmap.
2022-03-08 22:07:12 +01:00
Tobias Christiansen
a180b5f442 PixelPaint: Respect Mask when generating the display bitmap 2022-03-08 22:07:12 +01:00
Tobias Christiansen
82bfdec790 PixelPaint: Add mask Bitmap to Layer and expose it 2022-03-08 22:07:12 +01:00
Tobias Christiansen
31a9196bfe PixelPaint: Split bitmap() of Layer into {content, display}_bitmap
This is in preparation to support masking of Layers. We now distinguish
between the "display_bitmap" which will be the whole Layer with every
effect applied and the "content_bitmap" which contains the actual
unmodified pixels in the Layer.
2022-03-08 22:07:12 +01:00
Karol Kosek
b6510f8e76 KeyboardMapper: Ask for unsaved changes on window close and file open 2022-03-08 22:05:48 +01:00
Karol Kosek
ae9e4c6f26 KeyboardMapper: Reset modified flag after loading a file 2022-03-08 22:05:48 +01:00
Karol Kosek
2fd7506212 KeyboardMapper: Display dirty close icon when the file is changed 2022-03-08 22:05:48 +01:00
Matthew Olsson
b240d23a87 LibPDF: Propagate errors in Renderer/PDFViewer 2022-03-07 10:53:57 +01:00
Matthew Olsson
73cf8205b4 LibPDF: Propagate errors in Parser and Document 2022-03-07 10:53:57 +01:00
sa
fd628cdfec Browser: Fix crash in Storage Inspector when the cookie list is emtpy
This patch fixes a crash when clicking on an empty cookie list in the
Browsers Storage Inspector.
2022-03-06 01:36:41 +01:00
electrikmilk
056ca62778 FontEditor: Add code previews for fixed-width fonts
Add pseudo code to font preview for fixed-width programming fonts.
2022-03-05 21:24:25 +01:00
u9g
4147b56e79 Spreadsheet: Allow integer() to throw in weird cases
Also makes numericResolve use parseInt to avoid using our own integer()
2022-03-05 05:46:35 +03:30
u9g
75a02300ba Spreadsheet: Add find, findIndex, indexOf, & has to CommonRange 2022-03-05 05:46:35 +03:30
u9g
87c818c571 Spreadsheet: Put common Range(s) functionality into CommonRange class 2022-03-05 05:46:35 +03:30
Karol Kosek
5c978266e3 Spreadsheet: Ask about unsaved changes on "Open..." action activation 2022-03-04 11:56:52 -05:00
Karol Kosek
cef595aa5c CharacterMap+FontEditor: Switch current Unicode block on arrow press 2022-03-04 11:53:04 -05:00
Karol Kosek
17f9d3d45e CharacterMap: Go to character on arrow press in Search window 2022-03-04 11:53:04 -05:00
Karol Kosek
d4097f104e CharacterMap: Move search selection on arrow press in the search textbox 2022-03-04 11:53:04 -05:00
u9g
12ef20b869 Spreadsheet: Improve R function to support all of the examples 2022-03-04 04:29:20 +03:30
u9g
93115ee044 Spreadsheet: Add Range(s).toArray() 2022-03-04 04:29:20 +03:30
ForLoveOfCats
697e1810bf Calculator: Add keyboard input for more operations 2022-03-03 22:06:14 +01:00
ForLoveOfCats
19f80f88bf Calculator: Avoid focusing any keypad button other than the equal button
Having the return key sometimes press the equal button when nothing is
focused and press a different button when there is focus felt confusing.

The equal button is still able to be focused for the tab cycle to have
something to go to in order to jump out of the textbox but no other
keypad button can be focused now.
2022-03-03 22:06:14 +01:00
ForLoveOfCats
0d0ba375e2 Calculator: Utilize Button mimic_pressed to show when keys are pressed 2022-03-03 22:06:14 +01:00
Karol Kosek
20dbbdf90c Spreadsheet: Simplify enabling actions on selection
Since the function will *always* be called with some selection, we can
straight up enable actions.
2022-03-03 22:19:50 +03:30
Karol Kosek
f384aff510 Spreadsheet: Move deselection instructions to on_selection_dropped
The previous code never executed, as SpreadsheetView splits selection
events into `on_selection_changed` and `on_selection_dropped` depending
on whether there is any selection.
2022-03-03 22:19:50 +03:30
Karol Kosek
dc65543fa9 Spreadsheet: Show the opened filename in the window title
Prior to this commit, there was a set_filename() function that could set
the window title, but actually it never did that.  It was called only
in one place -- by the 'Save as...' action, but it always failed to
change anything, because there was a check that tried to reassign
the same filename. :/

This patch:
1. removes that check, and therefore
2. renames the function to simply `update_window_title()`,
3. starts calling the function from more places (at startup and after
   loading a file),
4. changes the window title order
   (`{app_name} - {filename}` -> `{filename} - {app_name}`) to match
   the other applications style on the system. :^)
2022-03-03 22:17:54 +03:30
Nícolas F. R. A. Prado
cb2e187be1 SoundPlayer: Sort CMake sources alphabetically 2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
5bafb80255 SoundPlayer: Draw album cover with correct aspect ratio
Instead of drawing the album cover scaled to cover the whole
visualization area, draw it resized to fit the area without altering the
aspect ratio.
2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
2470997fc9 SoundPlayer: Rename NoVisualization to AlbumCoverVisualization
Since the NoVisualization widget now shows the album cover, it should be
called AlbumCoverVisualization instead.
2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
2b1ac91764 SoundPlayer: Display album cover in the NoVisualizationWidget
Display the album cover for the current playing song in the
visualization area for the "None" Visualization.

For now only "cover.png" and "cover.jpg" are looked for in the same
directory for the album cover image.

When no cover image is found the serenity background is shown instead as
a fallback.
2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
2e1c017bce SoundPlayer: Add start_new_file() to VisualizationWidget's API
This adds a new start_new_file() function to VisualizationWidget which
is called when the player starts a new file, passing the filename of the
file. This allows VisualizationWidget subclasses to do any setup needed
when a new file is started.
2022-03-02 22:10:05 -08:00
Lenny Maiorani
064cfd6cb7 Applications: Fix undefined behavior capturing non-static constexpr 2022-03-02 22:01:58 -08:00