Commit Graph

57763 Commits

Author SHA1 Message Date
Aliaksandr Kalenik
e7eaf3b566 LibWeb: Remove rounding division for CSSPixels
Reverts 98926b487c
that regressed: block-and-inline/small-percentage-margin.html
(thrashing layout while window resizing)

Fixes https://github.com/SerenityOS/serenity/issues/22610
2024-01-06 21:40:27 +01:00
Timothy Flynn
7db8b206a8 Ladybird/AppKit: Show an informational dialog after taking a screenshot
The dialog displays where the screenshot is saved and presents an option
to open its containing folder.
2024-01-06 20:11:12 +00:00
Timothy Flynn
8801fed54e Ladybird/Qt: Show an informational dialog after taking a screenshot
The dialog displays where the screenshot is saved and presents an option
to open its containing folder.
2024-01-06 20:11:12 +00:00
Timothy Flynn
3a06d5a9a1 Browser: Show an informational dialog after taking a screenshot
The dialog displays where the screenshot is saved and presents an option
to open its containing folder.
2024-01-06 20:11:12 +00:00
Timothy Flynn
9218b2f3ce LibGUI: Add a MessageBox type to reveal a file
This will be used by Ladybird to open a screenshot's containing folder.
2024-01-06 20:11:12 +00:00
Andreas Kling
cc88a2657d LibWeb: Resolve grid item vertical margin/padding against CB width
Percentage vertical margin and padding values are relative to the
containing block *width*, not *height*. This has to be one of the most
commonly recurring mistakes we make :^)
2024-01-06 21:06:21 +01:00
david072
a84778f6ee Calendar/AddEventDialog: Prevent inputting invalid date ranges
The calendar now verifies that the user can't input invalid date ranges,
i.e. date ranges where the end is before the start. The UI elements do
this implicitly, by adjusting the values when changing the dates in an
illegal way (e.g. when picking an end date that is before the start
date, the end date will change to the start date).
2024-01-06 10:37:53 -07:00
david072
df3e6174b6 LibCore/DateTime: Add more binary operators 2024-01-06 10:37:53 -07:00
david072
b657fa6f95 Calendar: Ask about unsaved changes when closing the window :^)
The Calendar now asks about unsaved changes in the calendar when
attempting to close the window.
2024-01-06 10:37:53 -07:00
david072
75faa9239a Calendar/EventManager: Set m_dirty directly 2024-01-06 10:37:53 -07:00
david072
887f040d0e Calendar/EventManager: Store events as structs
Previously, the EventManager stored the calendar events as a raw
JsonArray of objects. Now, we parse the JSON into a Vector<Event>
structure and store that in the EventManager. This makes it easier to
access the events from the outside, as you now don't have to know the
JSON structure anymore.
2024-01-06 10:37:53 -07:00
david072
7df936b660 Calendar/AddEventDialog: Add a cancel button 2024-01-06 10:37:53 -07:00
david072
d0a4f6678c Calendar/AddEventDialog: Change SpinBoxes to accept 24-hour values
Since the meridiem selection was removed in the previous commit and
there currently doesn't seem to be a way to change the system time
format, I'm changing the SpinBoxes here to accept 24-hour format values
for now.
2024-01-06 10:37:53 -07:00
david072
60174cc9aa Calendar/AddEventDialog: Remove meridiem selection
This removes the meridiem selection in the AddEventDialog of the
calendar because it thus far didn't do anything.
2024-01-06 10:37:53 -07:00
david072
18b1f856e5 Calendar/AddEventDialog: Convert pointers to references
This removes some warnings ;^).
2024-01-06 10:37:53 -07:00
david072
2c68554629 Calendar/AddEventDialog: Use the DatePicker to pick dates 2024-01-06 10:37:53 -07:00
david072
985db495be LibCore/DateTime: Add helper for setting only the date from another date 2024-01-06 10:37:53 -07:00
david072
251e5fb074 LibCore/DateTime: Add a helper for setting the time individually 2024-01-06 10:37:53 -07:00
david072
8e77c72a5c LibGUI: Add a date picker dialog
This adds a simple date picker dialog using the existing GUI::Calendar.
2024-01-06 10:37:53 -07:00
david072
039114b728 Calendar: Move MonthListModel into Calendar.h
Previously, we had two versions of MonthListModel for the AddEventDialog
and the DatePickerDialog. Now, a unified version is in the Calendar.h
file, which can be used easily by anyone. Since that model and the
MeridiemListModel weren't used anymore in the AddEventDialog, I have
also removed them from there.
2024-01-06 10:37:53 -07:00
Andrew Kaster
5ed334e13a Userland: Fix compile errors from merging a PR without re-running CI
Hands have been slapped, more CI buttons should be pushed now D:
2024-01-06 10:27:24 -07:00
Bastiaan van der Plaat
0dd5aa40a8 LibWeb: Allow input color to give continuous updates 2024-01-06 10:02:15 -07:00
Bastiaan van der Plaat
cf69fd0a09 LibWeb: Add input element valueAsDate property 2024-01-06 09:59:30 -07:00
Bastiaan van der Plaat
be511fdcf7 LibWeb: Fix is valid time not possible compare bug 2024-01-06 09:59:30 -07:00
Cubic Love
6bde5a1f85 LibGUI: Make AboutDialog Copyright 2018-2024
Happy New Year everyone!
2024-01-06 16:42:57 +00:00
Dan Klishch
61d82e36b6 LibGUI: Make old register_property a private method of Object 2024-01-06 09:15:37 -07:00
Dan Klishch
1f4b15dcaa LibGUI: Port rest of the classes to property deserializers 2024-01-06 09:15:37 -07:00
Dan Klishch
bd56d2f508 LibGUI: Use property deserializers in macros for registering properties 2024-01-06 09:15:37 -07:00
Dan Klishch
1689ec9100 LibGUI: Introduce property deserializers for GML property values 2024-01-06 09:15:37 -07:00
Sam Atkins
fb6a9dd2f5 HexEditor: Clarify code for selecting byte colors
Instead of assigning, then sometimes reassigning these colors, set them
once. This makes it easier to see how we prioritize the different
factors that affect the styling.

`highlight_flag` is now `selected` since it represents if the byte is
within the current selection.
2024-01-06 16:08:49 +00:00
Sam Atkins
8ae4464fa5 HexEditor: Propagate HexDocumentFile creation errors in save_as() 2024-01-06 16:08:49 +00:00
Sam Atkins
034ec62cee HexEditor: Get document cells once per paint, not twice
HexDocument::get() involves a hash lookup, so let's store the returned
Cell instead of calling it twice for its two fields.
2024-01-06 16:08:49 +00:00
Sam Atkins
da52c5e82a HexEditor: Make edited bytes bold
This will help them still stand out once we introduce annotations, which
also modify the colors.
2024-01-06 16:08:49 +00:00
Sam Atkins
27adbd1792 HexEditor: Stop allocating a String for every character printed
When we have a single char, we can directly construct a StringView for
it instead, which doesn't require a String allocation.
2024-01-06 16:08:49 +00:00
kleines Filmröllchen
63de4d3ada Documentation: Expand package manager FAQ with pkg info
Explain a bit about what pkg is and what it isn't, and clarify that
while Serenity kinda-sorta has the beginnings of a "package manager",
it's not exactly like a typical Linux package manager with binary
software.
2024-01-06 05:01:35 -07:00
hanaa12G
7abda6a36f Kernel: Add new sysconf option _SC_GETGR_R_SIZE_MAX 2024-01-06 04:59:50 -07:00
hanaa12G
3c52c25515 LibC: Implement getgrgid_r() and getgrnam_r()
We currently don't have those 2 functions so let's add them
2024-01-06 04:59:50 -07:00
jared
3dfd8defa9 Kernel: Properly ack segments in the half-close state
We didn't proberly ack incoming packets while in the FinWait2. This fix
addresses that.
2024-01-06 03:13:01 -07:00
jared
7244369aff Kernel: Add unhandled cases for the FinWait2 state
According to RFC 9293 Section 3.6.1. Half-Closed Connections, we should
still accept incoming packets in the FinWait2 state. Additionally, we
didn't handle the FIN+ACK case. We should handle this the same we
handle the FIN flag. The ACK is only added to signify successful
reception of the last packet.
2024-01-06 03:13:01 -07:00
ronak69
9d3604215d LibLine: Implement basic cut-and-paste functionality
Every cut operation (erase last word backward/forward, erase line till
start/end) stores the erased characters in `m_last_erased` u32 vector.

The last erased characters will get inserted into the buffer when
`Ctrl+Y` (`insert_last_erased()` internal function) is pressed.
2024-01-06 13:28:17 +03:30
ronak69
97bcdba2a5 LibLine: Implement internal functions to jump cursor over non-space word
Two new internal functions `cursor_left_nonspace_word()` (`Ctrl+Alt+B`)
and `cursor_right_nonspace_word()` (`Ctrl+Alt+F`) that jump the cursor
left or right until a non-space character.

Same implementation as the alphanumeric word jump functions
`cursor_left_word()` (`Alt+B`) and `cursor_right_word()` (`Alt+F`).
2024-01-06 13:28:17 +03:30
ronak69
a6ce86a4b3 LibLine: Skip initial non-alphanumeric chars in cursor_right_word() 2024-01-06 13:28:17 +03:30
ronak69
b22be93e66 LibLine: Skip initial non-alphanumeric chars in cursor_left_word() 2024-01-06 13:28:17 +03:30
Andrew Kaster
5ace712282 LibWeb: Reset message port receive state before dispatching events
Dispatching events can cause arbitrary JS to run, which could cause the
event loop to be re-entered, or even post another message to the same
message port.
2024-01-06 10:13:14 +01:00
Andrew Kaster
09ce32039f AK: Use cast to const void pointer in to_readonly_span helper
This lets developers actually hex-dump print `Span<T const>` using the
helper as intended.
2024-01-06 10:13:14 +01:00
Lucas CHOLLET
52ce887b80 LibGfx/JPEG: Introduce a struct to hold sampling factors 2024-01-06 09:08:59 +00:00
Lucas CHOLLET
6c85f937ef LibGfx/JPEG: Print debug information on subsampling for each component 2024-01-06 09:08:59 +00:00
Lucas CHOLLET
145672a8b4 LibGfx/JPEG: Print some debug information about restart markers 2024-01-06 09:08:59 +00:00
Aliaksandr Kalenik
107bfbe283 LibWeb: Remove available space param from track init methods in GFC
Let's consistently use available space from `m_available_space`.

No behavior change expected.
2024-01-05 22:52:25 +01:00
Aliaksandr Kalenik
9c72807976 LibWeb: Account for auto-fill/fit when expanding grid lines in GFC
Named line placement now works when auto-fill or auto-fit is used to
define grid columns.
2024-01-05 22:52:25 +01:00