Commit Graph

40659 Commits

Author SHA1 Message Date
demostanis
c56cbf8027 CMake: Quote all CMAKE_COMMAND occurences
Building might fail if the cmake command path contains
whitespace. See https://stackoverflow.com/a/35853080.
2022-09-02 23:34:47 +01:00
Laco Papay
65dff8656e Base: Add emoji flags for Slovakia and Slovenia
Doing these together since (like the names) the flags are similar,
especially at this 7x10 scale and I wanted to make sure they can be
disginguished. I hope our Slovenian friends will like it.

Made inside Serenity using pp :^)
2022-09-02 23:32:55 +01:00
Karol Kosek
652870c178 LibGfx: Ignore incorrect .font files when building the Font Database
Previously every GUI application would crash if we had an incorrect (or
empty) .font file in /res/fonts.
2022-09-03 00:07:53 +02:00
Jelle Raaijmakers
6af184b48b Ports: Support SDL_WINDOWEVENT_CLOSE in SDL2
This allows PrBoom+ to properly quit the application when closing the
main window.
2022-09-03 00:07:24 +02:00
Jelle Raaijmakers
180effa8ac Ports: Add PrBoom+
Music (MIDI) works through TiMidity++ and OpenGL support works, but is
still very buggy. Sometimes PrBoom+ fails to load its own configuration
file, which can be worked around by deleting it.
2022-09-03 00:07:24 +02:00
Jelle Raaijmakers
808e0c9b17 Ports: Add TiMidity++
Also add it as a dependency for the `SDL_mixer` and `SDL2_mixer` ports.

Eawpats GUS patches are installed as part of the port, because without
patches TiMidity++ is not able to generate any sound. The license for
these is "fameware", credit to Andrew Suffield:

  https://lists.debian.org/debian-legal/2002/09/msg00137.html
2022-09-03 00:07:24 +02:00
Jelle Raaijmakers
8ab410a536 LibGL: Implement glGetTexImage
The plumbing was already there in LibGPU, so all that was left was to
implement the API :^)
2022-09-03 00:07:24 +02:00
Jelle Raaijmakers
4f69022c32 LibGL: Correct GL_BLEND_*_ALPHA constant values
They were plain wrong; while we're here, also add the `*_EXT` variants.
2022-09-03 00:07:24 +02:00
Jelle Raaijmakers
f08411ba3f LibGL: Improve constants and types compatibility
When compiling with SDL_opengl, all kinds of differences between LibGL
and OpenGL constants and types popped up as redefinition warnings and
errors.

This fixes all LibGL-related warnings when compiling PrBoom+ :^)
2022-09-03 00:07:24 +02:00
thankyouverycool
4d090487ac LibGUI: Stop auto repeat timer for Buttons on EnabledChange events
Since 5064b58 SpinBox buttons are disabled if value reaches the
min or max allowed. Consequently this swallows the final MouseUp
event, leaving the repeat timer running. Fixes SpinBoxes
{dec,inc}rementing their value in perpetuity after min/max value
is reached through button clicking.
2022-09-03 00:07:06 +02:00
Linus Groh
486775f9fe LibJS: Fix incorrect check in ValidateAndApplyPropertyDescriptor
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/f0e4ae8
2022-09-02 22:47:28 +01:00
Linus Groh
455537d31d LibJS: Assert Proxy target is a function in [[Call]] and [[Construct]]
As the TODOs suggested for a long time. :^)
2022-09-02 22:44:44 +01:00
Humberto Alves
fb5a39498a Ports/python3: Make pip work
Add two patches to allow Python's package manager to work on Serenity:

- The first one enables zlib module, which is needed for `ensurepip`
  command;
- The second patch fixes pip downloads, so it's possible to install
  packages from the PyPI repository.
2022-09-02 14:03:24 +01:00
electrikmilk
723a22fa5d Base: Improve and correct emojis
🐞 - U+1F41E LADY BEETLE
🧪 - U+1F9EA TEST TUBE
🇮🇶 - U+1F1EE U+1F1F6 FLAG: IRAQ
2022-09-02 11:40:50 +01:00
electrikmilk
4de722eb9e Base: Add 13 new emojis
🧠 - U+1F9E0 BRAIN
🧇 - U+1F9C7 WAFFLE
🧂 - U+1F9C2 SALT
🥧 - U+1F967 PIE
🧊 - U+1F9CA ICE
🧭 - U+1F9ED COMPASS
⛩ - U+26E9 SHINTO SHRINE
🛢 - U+1F6E2 OIL DRUM
🪄 - U+1FA84 MAGIC WAND
🩻 - U+1FA7B X-RAY
🪞 - U+1FA9E MIRROR
🇦🇺 - U+1F1E6 U+1F1FA FLAG: AUSTRALIA
🇮🇹 - U+1F1EE U+1F1F9 FLAG: ITALY
2022-09-02 11:40:50 +01:00
Xexxa
72a812a0c3 Base: Add more emoji
💫 - U+1F4AB DIZZY
💨 - U+1F4A8 DASHING AWAY
👤 - U+1F464 BUST IN SILHOUETTE
👥 - U+1F465 BUSTS IN SILHOUETTE
🦇 - U+1F987 BAT
🦈 - U+1F988 SHARK
🐝 - U+1F41D HONEYBEE
🥀 - U+1F940 WILTED FLOWER
🦀 - U+1F980 CRAB
🦑 - U+1F991 SQUID
🥂 - U+1F942 CLINKING GLASSES
🚒 - U+1F692 FIRE ENGINE
🚔 - U+1F694 ONCOMING POLICE CAR
 - U+26F5 SAILBOAT
🛎️ - U+1F6CE BELLHOP BELL
 - U+231A WATCH
🌠 - U+1F320 SHOOTING STAR
🥉 - U+1F949 3RD PLACE MEDAL
🥊 - U+1F94A BOXING GLOVE
👔 - U+1F454 NECKTIE
🧦 - U+1F9E6 SOCKS
💄 - U+1F484 LIPSTICK
🥁 - U+1F941 DRUM
📠 - U+1F4E0 FAX MACHINE
 - U+2753 RED QUESTION MARK
 - U+2754 WHITE QUESTION MARK
 - U+2755 WHITE EXCLAMATION MARK
 - U+2757 RED EXCLAMATION MARK
2022-09-02 02:11:58 +01:00
Xexxa
24e7a6eca8 Base: Improve emoji
More similar in style to U+203C:
⁉️ - U+2049 EXCLAMATION QUESTION MARK

Add transparency:
📧 - U+1F4E7 E-MAIL
📨 - U+1F4E8 INCOMING ENVELOPE
📩 - U+1F4E9 ENVELOPE WITH ARROW

No joy in a joystick without an action-button!
🕹️ - U+1F579 JOYSTICK
2022-09-02 02:11:58 +01:00
davidot
9f661d20f7 LibJS: Allow anonymous functions as default exports
This requires a special case with names as the default function is
supposed to have a unique name ("*default*" in our case) but when
checked should have name "default".
2022-09-02 02:07:37 +01:00
davidot
0fc67ffd62 LibJS: Make indirect bindings of module behave like normal bindings
Before this we attempted to hack around this by only overriding
has_binding. However this did not cover all cases, for example when
assigning to variables before their declaration it didn't throw.
By using the new find_binding_and_index virtual method we can just
pretend the indirect bindings are real.

Since indirect binding do come from a normal environment we need to
ensure you cannot modify the binding and that properties like mutable
are false as expected by the spec for such an indirect binding.
2022-09-02 02:07:37 +01:00
davidot
2484bbc4e0 LibJS: Make DeclarativeEnvironment based on bindings instead of indices
This will allow other environments which extend DeclarativeEnvironment
to provide their own custom bindings.
2022-09-02 02:07:37 +01:00
davidot
faf1430ce4 LibJS: Allow exporting any imported bindings 2022-09-02 02:07:37 +01:00
davidot
462c6df24b LibJS: Only check for duplicate exports if they have a name
Together with removing an incorrect VERIFY this allows multiple star
imports in a single module.
2022-09-02 02:07:37 +01:00
davidot
3b56043612 LibJS: Put exports before symbols in keys of module namespace object 2022-09-02 02:07:37 +01:00
davidot
fb61e9274a LibJS: Call resolve instead of reject in AsyncFromSyncIteratorPrototype 2022-09-02 02:07:37 +01:00
davidot
3b1c3e574f LibJS: Handle empty named export
This is an export which looks like `export {} from "module"`, and
although it doesn't have any real export entries it should still add
"module" to the required modules to load.
2022-09-02 02:07:37 +01:00
davidot
f75c51b097 LibJS: Allow full ModuleExportName in namespace
This means we should accept a string after 'export * as '.
2022-09-02 02:07:37 +01:00
davidot
75ebcf6b4a AK: Allow exponents in JSON double values
This is required for ECMA-404 compliance, but probably not for serenity
itself.
2022-09-02 02:07:37 +01:00
demostanis
68c6161f25 LibMarkdown: Add newline and remove ANSI escape after code blocks
Also make clang-tidy happy by making line a const&
2022-09-01 23:36:23 +00:00
djwisdom
7925d51c45 Base: Add new Magnifier help documentation 2022-09-01 23:30:12 +00:00
Timothy Slater
5064b581ee LibGUI: Disable increment/decrement buttons on SpinBox based on value
When the value for a SpinBox equals the max, disable the increment
button. Functionally, clicking the button doesn't do anything because
the set_value() clamps the value to min/max and updates the textbox.
However it is still nice to indicate to the user that they've reached
the max. Same goes for minimum value and the decrement button.
2022-09-01 17:47:49 +01:00
Timothy Slater
e43e412fc8 LibGUI: Improve SpinBox usability
Previously the value of the SpinBox is re-evaluated after every change
to the TextBox control. This leads to very unintuitive behavior such as
the user deleting the contents of the box and it having no
visible effect. This happens because the TextBox no longer has a valid
number and so gets reset to the current m_value of the SpinBox.

By defering the update of to the SpinBox value until focus leaves the
control we provide a much more intuitive experience with the text box.
We do still validate when a user types something that it parses to an
int. If it does not we delete the most recent character. This in effect
prevents non-numeric numbers from being entered.

Upon losing focus the value will be checked. If empty we set the SpinBox
value to the minimum allowed value.
2022-09-01 17:47:49 +01:00
Joel Hansen
1183bc5184 Base: Add new emoji
⚔️ - U+2694 Crossed Swords
🧪 - U+1F9EA Test Tube
⚕️ - U+2695 Medical Symbol
🍀 - U+1F340 Four Leaf Clover
2022-09-01 15:21:49 +01:00
Karol Kosek
1282ef5d9e Base: Remove an upscaled version of a Hidden cursor
It was the same as the normal Hidden cursor (a transparent image).
2022-09-01 14:27:07 +01:00
Karol Kosek
5478409025 LibGfx: Fallback to a default scaled bitmap if the upscaled one failed
This makes cursors in a 2x Display Scale without a special upscaled
version (such as a Hand cursor) display the 1x version instead.
2022-09-01 14:27:07 +01:00
NoahR02
406dff16d1 HackStudio: Fix cpp-gui template 2022-09-01 14:25:31 +01:00
Timothy Slater
f2da577e77 PixelPaint: Change repeated code into a loop for Wand Select Tool 2022-08-31 18:19:46 +01:00
Karol Kosek
a0ef00cab2 LibGUI: Don't accept drag events in AbstractView if it's not editable
With a new DragCopy cursor icon being used on accepted events, this
caused a 'false assumption' that everything can be dropped into
AbstractView.

This will now only happen if the View is editable, which still isn't
perfect, but at least the Settings app will no longer change cursors.
Also note that we won't get "drag move" events as the comment below
says, which disables automatic scrolling when dragging an element.
2022-08-31 17:29:44 +01:00
Karol Kosek
1d9ec8bd56 LibVT: Accept supported drag enter events 2022-08-31 17:29:44 +01:00
Karol Kosek
f1aa03b779 WindowServer: Place drag and drop overlay at the cursor position
... instead of in the center of the cursor bitmap.

It doesn't make much of a difference, as the default cursor hotspot is
center. But since now we switch between a normal Drag cursor and
DragCopy one that has set hotspot, this caused the overlay to shake.
2022-08-31 17:29:44 +01:00
Karol Kosek
d4aff36875 WindowServer: Include window frames when sending drag events
Previously, the cursor would use a default cursor on window frames such
as the title bar and menu bar, which was not quite correct as drop
events were still handled there.
2022-08-31 17:29:44 +01:00
Karol Kosek
2e244fc85b WindowServer+LibGUI: Change cursor icon if DragEnter event was accepted 2022-08-31 17:29:44 +01:00
Karol Kosek
e5674d9666 Base+WindowServer+LibGfx: Add new DragCopy Cursor
The purpose of this cursor is to indicate if a current dragged object
(file, Spreadsheet cell) can be dropped onto a widget.
2022-08-31 17:29:44 +01:00
Karol Kosek
06102ff9af Base: Add 2x version of Drag cursor in Dark theme
Failing to load 2x cursor resulted in using the default arrow cursor
instead of scaling the 1x one.
2022-08-31 17:29:44 +01:00
Timothy Slater
25ac38cac1 PixelPaint: Make erase_selection work for non-rectangular selections
Layer::erase_selection used to erase the entire bounding box of the
selection. With the add/subtract merge modes for the selection tool it
is possible to create selections which are not rectangular. This leads
to deleting pixels that were not selected.

This change adjusts the erase behavior to walk the selection rect and
check if a pixel is selected or not before deleting.
2022-08-31 16:59:22 +01:00
Jelle Raaijmakers
a373542f4c Profiler: Display correctly rounded percentages as '#.##%' 2022-08-31 16:57:40 +01:00
Timothy Slater
fcf86b07a5 PixelPaint: Add Wand Select Tool
Wand Selection tool uses similar logic to the Bucket Tool. Flood filling
and threshold calculations to determine the affected area just in this
case we do not set the pixels of the selected area, instead we use
those pixels to alter the selection mask.

In the future we can probably abstract out the shared flood logic so
both tools can share the code.
2022-08-31 16:30:23 +02:00
Tim Schumacher
5e11a512d6 Kernel: Buffer an entire region when generating coredumps
This allows us to unlock the region tree lock early, to avoid keeping
the lock while we are doing IO.
2022-08-31 16:28:47 +02:00
Tim Schumacher
32a03cffeb Kernel: Work using copies of specific region data during a coredump
This limits our interaction with the "real" region tree (and therefore
its lock) to the time where we actually read from the user address
space.
2022-08-31 16:28:47 +02:00
Timothy Slater
066c5acee1 PixelPaint: Change BucketTool flood fill algorithm
This resolves some cases where the existing filling algorithm could get
stuck in a recursion loop and evenutally overflow the stack.
2022-08-31 16:26:09 +02:00
Timothy Slater
0506f4eef8 PixelPaint: Account for alpha in color distance calculation
This fixes an issue where BucketTool would consider "black"
and "transparent" the same color.
2022-08-31 16:26:09 +02:00