Andreas Kling
cd9ad6a05e
LibGUI: Tweak AbstractButton and subclass constructors
...
Taking a "const StringView&" for the initial text does not achieve
anything useful. Just take a "String" and move it into storage.
2020-12-28 15:53:10 +01:00
Peter Nelson
476911e1f9
LibGfx: fix OOB access in LZW decoder on bad input
...
This fixes an issue where a corrupted LZW code can result in the first
element of an empty buffer being accessed.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27863
2020-12-28 15:12:29 +01:00
Luke
be30dc2b18
LibJS: Implement Object.prototype.isPrototypeOf
...
Spec: https://tc39.es/ecma262/#sec-object.prototype.isprototypeof
2020-12-28 13:10:07 +01:00
AnotherTest
ee1d9217aa
LibRegex: Fail early if eof seen after '(?'
...
Fixes #4583 .
2020-12-28 13:09:22 +01:00
Andreas Kling
92c073a9d1
LIbGUI+LibGfx: Paint focused push buttons with a heavier look
...
Draw a heavy shadow frame around focused push buttons for emphasis.
For now I've used the ThreedShadow2 color role as it feels dark enough.
2020-12-28 12:41:26 +01:00
Andreas Kling
2bbf3b5d0b
LibGUI: Always focus the file name textbox in GUI::FilePicker
...
Previously we would only auto-focus it when choosing a save location.
It seems nice to have the same behavior when opening a file.
2020-12-28 11:44:29 +01:00
Andreas Kling
ffa241250b
LibGUI: Make GUI::FileIconProvider::icon_for_executable() a public API
...
This way we can use it instead of icon_for_path() in a bunch of places
and avoid loading the full FileIconProvider configuration.
2020-12-28 11:41:09 +01:00
Idan Horowitz
0ddde46c19
LibVT: Implement find and scroll helper methods in TerminalWidget
...
This is mostly based on TextDocument's similar methods, these will
help implement searching within the terminal application.
The support for unicode code points is shaky at best, and should
probably be improved further.
2020-12-28 11:40:35 +01:00
Idan Horowitz
6446135681
LibVT: Create VT::Range and use it to replace selection start / end
...
Based on GUI::TextRange, This is both a bit more expressive and will
eventually be used for searching within the terminal
2020-12-28 11:40:35 +01:00
Linus Groh
58890e03b6
Everywhere: Move AppFile from LibGUI to LibDesktop
...
This was mentioned in #4574 , and the more I think about it the more it
feels just right - let's move it there! :^)
Having to link LaunchServer against LibGUI explicitly should've been
telling enough...
2020-12-28 01:28:07 +01:00
Andreas Kling
97c42694db
LibGUI: Make selected item tint color based on focused state
...
Use the inactive selection color for item icon tinting when the item
view is not focused.
2020-12-28 01:14:01 +01:00
Andreas Kling
0f1235be25
LibGUI: Show a hand cursor when hovering over a GUI::LinkLabel
2020-12-28 01:02:57 +01:00
Andreas Kling
644d5c5404
LibGUI: Switch focus if the currently focused widget is disabled
2020-12-28 01:02:57 +01:00
Brendan Coles
bceee87f61
LibELF: Reject ELF with program header p_filesz larger than p_memsz
2020-12-27 23:27:07 +01:00
Xavier Cooney
ca0f3db004
LibJS: Implement Array.prototype.sort()
2020-12-27 23:24:33 +01:00
Andreas Kling
a103eae0d4
LibJS: Run "prettier" on the tests :^)
2020-12-27 23:13:52 +01:00
dantje
d1366b660e
LibGUI: Use Object::remove_all_children() in BreadcrumbBar ( #4580 )
2020-12-27 23:07:10 +01:00
Nathan Lanza
d1891f67ac
AK: Use direct-list-initialization for Vector::empend() ( #4564 )
...
clang trunk with -std=c++20 doesn't seem to properly look for an
aggregate initializer here when the type being constructed is a simple
aggregate (e.g. `struct Thing { int a; int b; };`). This template fails
to compile in a usage added 12/16/2020 in `AK/Trie.h`.
Both forms of initialization are supposed to call the
aggregate-initializers but direct-list-initialization delegating to
aggregate initializers is a new addition in c++20 that might not be
implemented yet.
2020-12-27 23:06:37 +01:00
Stephen Gregoratto
1867c928a9
LibC: Add fseeko/ftello
...
This changes the signatures for FILE::seek and FILE::tell, to use
`off_t` as they use lseek internally. `fpos_t` is also redefined to use
`off_t`.
Dr. POSIX says that fpos_t is:
> A non-array type containing all information needed to specify uniquely
> every position within a file.
In practice, most *NIX typedef it to `off_t`, or a struct containing an
`off_t` and some internal state.
2020-12-27 23:05:14 +01:00
Stephan Unverwerth
f603128e55
LibJS: Fix old object numeric key test now that toString() is correct
2020-12-27 23:04:09 +01:00
Stephan Unverwerth
d3524f47a0
LibJS: Implement (mostly) spec compliant version of Number.toString()
2020-12-27 23:04:09 +01:00
Stephan Unverwerth
be9c2feff0
LibJS: Fix parsing of numeric object keys
...
Numeric keys were interpreted as their source text, leading to
something like {0x10:true} to end up as {"0x10":true}
instead of {16:true}
2020-12-27 23:04:09 +01:00
Idan Horowitz
fdacfefd09
LibVT: Use the 'U+FFFD replacement character' to indicate a parsing error
...
Based on this recommendation in the Unicode standard:
https://www.unicode.org/versions/Unicode13.0.0/ch23.pdf (Page 32)
2020-12-27 22:49:08 +01:00
Linus Groh
ddeb261bc2
Terminal+LibVT: Use GUI::AppFile
2020-12-27 22:46:52 +01:00
Linus Groh
616c217a09
LibGUI: Add GUI::AppFile, a simple wrapper around .af files
2020-12-27 22:46:52 +01:00
Łukasz Maciejewski
518ba73dcb
LibTextCodec: Add Latin2 text decoder ( #4579 )
2020-12-27 22:44:38 +01:00
Linus Groh
5122f98198
Base+LibJS+LibWeb: Make prettier clean
...
Also use "// prettier-ignore" comments where necessary rather than
excluding whole files (via .prettierignore).
2020-12-27 21:25:27 +01:00
Andreas Kling
76239f89c2
LibGUI: Select the edited text by default in StringModelEditingDelegate
...
This way, if you press F2 to edit the name of an item, the name will be
selected in the editor that pops up, and you can start typing a new
name for it immediately.
2020-12-27 19:08:19 +01:00
Andreas Kling
f294bdedcc
LibGUI: Make IconView return a larger content rect for editing
...
This fixes a visual glitch where editing the name of an item in an
IconView would cut off the edited text.
2020-12-27 19:05:43 +01:00
Andreas Kling
04f1f74b85
LibGUI+WindowServer: Tweak hover shadows slightly
...
Move the shadow 1 more pixel away from the unhovered icon location,
making a total 2 pixel distance between the icon and the shadow.
Also tweak the shadow color to be a darkened variant of the base color
underneath the icon.
2020-12-27 18:43:34 +01:00
Linus Groh
2e7395d6da
LibGUI: Include LibGfx/Bitmap.h in Icon.h
...
It doesn't compile with just the forwarding headers when nothing else
(e.g. Button.h) pulls in Bitmap.h.
2020-12-27 18:36:43 +01:00
Linus Groh
e955c024b2
LibCore: Add Object::remove_all_children()
2020-12-27 18:36:43 +01:00
Andreas Kling
8b31833650
LibGUI: Support top-to-bottom flow in IconView
...
Sometimes you might want your icons to flow from top-to-bottom instead
of from left-to-right. :^)
2020-12-27 14:48:12 +01:00
Andreas Kling
0117c57418
LibGUI: Move some large IconView internal helpers to the .cpp file
...
Stuff that's only used internally by the class is nice to keep out of
the header when possible.
2020-12-27 14:48:12 +01:00
Andreas Kling
0e2b7f9c9a
Kernel: Remove the per-process icon_id and sys$set_process_icon()
...
This was a goofy kernel API where you could assign an icon_id (int) to
a process which referred to a global shbuf with a 16x16 icon bitmap
inside it.
Instead of this, programs that want to display a process icon now
retrieve it from the process executable instead.
2020-12-27 01:16:56 +01:00
Andreas Kling
cb68b8ff8b
LibGUI: Use FileIconProvider in RunningProcessesModel
...
This was the last remaining client of the per-process icon_id.
2020-12-27 01:16:56 +01:00
Andreas Kling
21ccbc2167
Kernel: Expose process executable paths in /proc/all
2020-12-27 01:16:56 +01:00
Andreas Kling
3be9a9ac76
LibTLS: Fix TLS breakage after ByteBuffer => Span conversion
...
Oops, I accidentally shadowed the outer scope's "decrypted" ByteBuffer
which caused us to throw away the buffer too early.
Fixes #4533 .
2020-12-26 16:09:02 +01:00
Andreas Kling
bdff88d8d5
LibGUI: Make the LinkLabel widget keyboard-friendly
...
Make it tab-focusable and activate it with the return key. :^)
2020-12-26 16:09:02 +01:00
Andreas Kling
7babe5ade6
LibGUI: Set LinkLabel tooltip if text can't fit the widget
...
We were setting a tooltip when the text overflowed the *window* width,
make this more general by basing it on the *widget* width.
2020-12-26 13:17:57 +01:00
Andreas Kling
4e084793df
LibGUI: Tweak GUI::Label API a bit and add did_change_text() virtual
2020-12-26 13:11:43 +01:00
Andreas Kling
9fe310c470
LibGUI: Minor tweaks to the GUI::LinkLabel
...
Remove some unnecessary includes and make the constructor private.
2020-12-26 13:07:53 +01:00
Andreas Kling
5452c8a566
LibGUI: Rename Link => LinkLabel
2020-12-26 13:03:38 +01:00
Lenny Maiorani
b2316701a8
Everywhere: void arguments to C functions
...
Problem:
- C functions with no arguments require a single `void` in the argument list.
Solution:
- Put the `void` in the argument list of functions in C header files.
2020-12-26 10:10:27 +01:00
Sahan Fernando
b990fc5d3a
LibC: Enable compiler warnings for scanf and strftime format strings
2020-12-26 10:05:50 +01:00
Sahan Fernando
d780e2265d
LibC: Fix some incorrect printf usages
2020-12-26 10:05:50 +01:00
Sahan Fernando
6b01d1cf14
LibC: Enable compiler warnings for printf format strings
2020-12-26 10:05:50 +01:00
Linus Groh
d4a60583a9
LibDesktop: Remove icons from Desktop::Launcher::Details
2020-12-26 01:09:13 +01:00
Xavier Cooney
1cf92d39eb
LibJS: Implement String.prototype.endsWith()
2020-12-26 01:09:04 +01:00
Xavier Cooney
43f948b357
LibJS: Implement IsRegExp abstract operation
...
This is needed by various String.prototype operations, as well as
the RegExp constructor.
2020-12-26 01:09:04 +01:00