asynts
7c53f14bbc
LibCompress: Implement DEFLATE properly.
...
Now we have an actual stream implementation that can read arbitrary
(dynamic codes aren't supported yet) deflate encoded data. Even if
the blocks are really large.
And all of that happens with a single buffer of 32KiB. DEFLATE is
amazing!
2020-08-26 21:07:53 +02:00
asynts
71cbf72e8a
AK: Add InputBitStream class.
2020-08-26 21:07:53 +02:00
asynts
a82fead38a
AK: Add CircularDuplexStream class.
2020-08-26 21:07:53 +02:00
asynts
8e08d9f70a
AK: Fix the signature of binary_search.
2020-08-26 21:07:53 +02:00
asynts
18b3de7555
AK: Add stream operators for Optional.
2020-08-26 21:07:53 +02:00
Andreas Kling
e3bfe0b509
LibWeb: Fix sometimes missing text selection highlight
...
There's no selection if it starts and ends at the same column, but only
if both columns are in the same node. :^)
2020-08-26 21:00:26 +02:00
Andreas Kling
8cc2a55cff
LibGUI: Update AbstractTableView row header sizes on set_row_height()
2020-08-26 20:50:54 +02:00
Andreas Kling
368dc8ad08
Spreadsheet: Tweak row height slightly
...
Add 2px of height to the rows. This makes editing a cell inline look
better since we no longer cut off the text while editing.
2020-08-26 20:35:09 +02:00
Andreas Kling
c4347a16cf
LibGUI: Make AbstractTableView row height configurable
...
The row height is per-table, not per-row, but this is still nice.
2020-08-26 20:34:07 +02:00
Andreas Kling
d125c624c6
Spreadsheet: Use a fixed-width font in the cell editor
2020-08-26 17:00:40 +02:00
Andreas Kling
c5278dac99
Spreadsheet: Don't ignore selections in the A column :^)
...
This was a leftover from when the first column contained row numbers.
2020-08-26 17:00:40 +02:00
Andreas Kling
9a0f40d4b5
LibGUI: Add a top-left-corner button to table views
...
If both the row and column headers are visible, we now also show a
button in the top left corner. This avoids the headers overlapping
each other when you scroll the contents.
In the future, this could be hooked up to a "select all" action.
2020-08-26 17:00:40 +02:00
Andreas Kling
8cacac32b5
Spreadsheet: Enable row headers for the spreadsheet TableView
2020-08-26 17:00:40 +02:00
Andreas Kling
695b283b8c
Spreadsheet: Get rid of the "row numbers" column
...
Let's use TableView's row headers for this instead. :^)
2020-08-26 17:00:40 +02:00
Andreas Kling
447b65bf7b
LibGUI: Add (optional) row headers to GUI::TableView
...
You can now get row headers in your TableView by simply calling:
table_view.row_header().set_visible(true)
Note that rows are not yet resizable.
2020-08-26 17:00:40 +02:00
Andreas Kling
49a5038a1a
LibGUI: Avoid implementing vertical HeaderView section resize for now
...
Resizable rows will require a bunch of changes in the table view layout
code, so let's not make the normal resizing areas grabbable for now.
2020-08-26 17:00:40 +02:00
Andreas Kling
e418bdf95b
LibGUI: Don't update key column when clicking vertical headers
...
Vertical headers are only concerned with rows, after all.
2020-08-26 17:00:40 +02:00
Andreas Kling
5b46835a9d
LibGUI: Fix HeaderView::section_rect() for vertical headers
...
Vertical headers shouldn't worry about horizontal padding.
2020-08-26 17:00:40 +02:00
Andreas Kling
c241ab75cd
LibGUI: Simplify HeaderView::mouseup_event() slightly
2020-08-26 17:00:40 +02:00
Andreas Kling
3f4df7c6da
LibGUI: Reset hovered section when mouse cursor leaves a HeaderView
2020-08-26 17:00:40 +02:00
thankyouverycool
30ad295fa1
Base+HackStudio: Rename project file extensions to .hsp
...
More concise in Views and consistent with other extensions.
2020-08-26 16:59:34 +02:00
thankyouverycool
45901d4141
LibGUI+HackStudio: Associate new icons with their extensions
2020-08-26 16:59:34 +02:00
thankyouverycool
b227d54843
Base: Add new icons for HackStudio
...
Adds new filetype icons for forms and project files and a new root
icon for HackStudio's project tree.
2020-08-26 16:59:34 +02:00
thankyouverycool
208cb995ba
WindowServer+LibGfx: Move title bar button layout to WindowTheme
2020-08-26 08:53:14 +02:00
Nico Weber
1ab8939077
AK+LibC+LibCore: Have fewer implementations of day_of_week
...
The implementation in LibC did a timestamp->day-of-week conversion
which looks like a valuable thing to have. But we only need it in
time_to_tm, where we already computed year/month/day -- so let's
consolidate on the day_of_week function in DateTime (which is
getting extracted to AK).
2020-08-26 08:52:07 +02:00
Nico Weber
b9cbb4fd00
LibC: Minor style tweaks to tm_to_time
2020-08-26 08:52:07 +02:00
Nico Weber
2236385e1f
AK+LibC+LibCore: Add a days_in_year function
2020-08-26 08:52:07 +02:00
Nico Weber
a7a18b478e
AK+LibC+LibCore: Have fewer implementations of days_in_month
2020-08-26 08:52:07 +02:00
Nico Weber
dcb81fc199
LibCore: Use is_leap_year more in DateTime
2020-08-26 08:52:07 +02:00
Nico Weber
4dfe97f9ae
Kernel: Minor tweak to now() computation
...
Make sure the expression is evaluated as time_t so that it does
the right thing after 2037, and factor things so that the constants
look less magical.
2020-08-26 08:52:07 +02:00
Nico Weber
c85e679e2d
AK+LibCore+Kernel: Have fewer implementations of day_of_year
...
The JS tests pointed out that the implementation in DateTime
had an off-by-one in the month when doing the leap year check,
so this change fixes that bug.
2020-08-26 08:52:07 +02:00
Nico Weber
2c1b84b3e1
LibJS: Add some more tests, mostly around leap years
2020-08-26 08:52:07 +02:00
Nico Weber
9b17082899
AK+LibC+Kernel: Have fewer implementations of year_to_days_in_epoch
...
I believe the implementation in RTC.cpp had an off-by-one
in the year passed to is_leap_year(). If that's true, then this
fixes that too.
2020-08-26 08:52:07 +02:00
Nico Weber
84ed257959
AK+LibC+LibCore+Kernel: Have fewer implementations of is_leap_year
2020-08-26 08:52:07 +02:00
AnotherTest
394e4c04cd
LibJS: Add a helper for calling JS::Function's with arguments
...
The fact that a `MarkedValueList` had to be created was just annoying,
so here's an alternative.
This patchset also removes some (now) unneeded MarkedValueList.h includes.
2020-08-26 08:45:01 +02:00
Rewi Haar
521e730df1
LibWeb: Calculate selection based on glyph centers
...
Previously you had to drag all the way to the end of a glyph to select
it; now you just need to drag past the center. Also fixes #2959 .
2020-08-26 08:44:31 +02:00
Tom
dd83f6a266
Kernel: Fix losing PTEs
...
We can't use a HashMap with a small key that doesn't guarantee
collisions. Change it to a HashTable instead.
Fixes #3254
2020-08-26 01:25:06 +02:00
Tom
bcbe2fe525
Kernel: Protect looping over VMObject regions
...
We need to hold the memory manager lock so nobody else can modify
these lists while we're iterating them.
2020-08-26 01:25:06 +02:00
Ben Wiederhake
0e27a6e39e
AK: Demonstrate and fix Checked
...
Specifically:
- post-increment actually implemented pre-increment
- helper-templates that provided operator{+,-,*,/}() couldn't possibly work,
because the interface of add (etc) were incompatible (not taking a Checked<>,
and returning void)
2020-08-26 00:55:13 +02:00
Ben Wiederhake
cd93fb9656
LibC: Deduplicate declaration of strcasecmp
2020-08-26 00:55:13 +02:00
Andreas Kling
9a25dd99c3
LibGUI: HeaderView should always notify parent when sections resize
...
The view needs to recompute the scrollable content size whenever this
happens, so let's always notify it. Previously we were only doing this
when resizing columns with interactively (not programmatically.)
2020-08-26 00:51:35 +02:00
Andreas Kling
cfc30b11ba
LibGUI: Rename table view's "cell painting delegate" to "column *"
...
What you install with this API is a delegate that manages painting of
all the items in a specific column, so let's make the API reflect that.
2020-08-26 00:51:35 +02:00
Andreas Kling
44e371635e
LibGUI: Move table view headers into their own widget
...
This patch introduces the HeaderView class, which is a widget that
implements the column headers of TableView and TreeView.
This greatly simplifies event management in the view implementations
and also makes it much easier to eventually implement row headers.
2020-08-26 00:51:35 +02:00
Andreas Kling
eca6ff353e
LibGUI: Make Splitter inherit from Widget instead of Frame
...
It wasn't using any of the Frame features, so I'm not sure what the
idea here was.
2020-08-26 00:51:35 +02:00
Andreas Kling
ac78531756
LibGUI: Clip GUI::Frame children to the frame_inner_rect()
...
This way we don't draw the frame border underneath our children. :^)
2020-08-26 00:51:35 +02:00
Andreas Kling
a265d40d6e
LibGUI: Allow widgets to clip their child widgets
...
This patch adds Widget::children_clip_rect() which can be overridden
to tighten clipping of a widget's children. The default implementation
simply returns Widget::rect().
2020-08-26 00:51:35 +02:00
Andreas Kling
965ccf5242
Spreadsheet: Focus the spreadsheet table on startup
2020-08-26 00:51:35 +02:00
Andreas Kling
af16552624
LibGUI: Add Widget focus proxies
...
A Widget can now have a focus proxy widget. Questions about focus are
redirected to the proxy if present. This is useful if a widget could
logically get focus, but wants one of its child widgets to actually
handle it.
2020-08-26 00:51:35 +02:00
Sergio Ahumada
9ba3862ee9
LibC: Prospective fix for openssl build
...
serenity/Build/Root/usr/include/sys/socket.h:93:26: error: 'sockaddr_un' undeclared here (not in a function)
93 | char data[sizeof(sockaddr_un)];
| ^~~~~~~~~~~
make[2]: *** [<builtin>: bss_fd.o] Error 1
2020-08-26 00:46:04 +02:00
LepkoQQ
777b298880
LibGUI: Change window size and margin in ColorPicker
2020-08-26 00:38:23 +02:00