Commit Graph

1308 Commits

Author SHA1 Message Date
sin-ack
7adc5725b8 Base: Add the serenity-application HackStudio template
This is a template which instantiates into what you'd write to start out
a basic Serenity GUI application. It contains a CMakeLists.txt file
which describes what each declaration does, a simple GUI application
which uses layouts, widgets and callbacks, and comes with a minimal set
of pledges which the user can add to as necessary.
2021-08-14 13:32:08 +02:00
Sam Atkins
e6c0cb5a7f LibWeb: Implement and use OverflowStyleValue
Also added a test page for the `overflow` properties. They apparently
don't work, but at least they do parse.
2021-08-14 12:45:01 +02:00
Sam Atkins
e3cbd366c7 Base: Correct flipped values in border-radius.html
Box 9 and Box 10 were in the wrong order somehow, so now they are not.
:^)
2021-08-14 12:45:01 +02:00
Sam Atkins
2644d2c221 LibWeb: Implement and use FlexStyleValue
This is not just moving the code from StyleResolver to Parser. The logic
has changed to allow for the `flex-basis` to come before or after the
`flex-grow/shrink` values, as well as handle the special one-value
cases.

Also added test cases to flex.html to check the parsing. It does parse
correctly, but elements with `flex-basis: auto` do not calculate their
width correctly.
2021-08-14 12:45:01 +02:00
Sam Atkins
44a082391b LibWeb: Implement and use TextDecorationStyleValue
Modified text-decoration.html to better test that the values can be in
any order, and that it adopts the color from the `color` property if no
decoration color is specified. Right now, it always does because we do
not support a different decoration color. Later, we need to support the
`currentcolor` special CSS value for this purpose.
2021-08-14 12:45:01 +02:00
Sam Atkins
0e15561df0 LibWeb: Implement and use ListStyleStyleValue
Yes, the name is silly, but it's a StyleValue for list-style, so...
yeah. :^)

Since `list-style-type` and `list-style-image` can both have `none` as a
value, and can appear in any order, we have to handle it separately, and
then assign either or both of those to `none` depending on how many
`none`s there are, and whether those sub-properties already have values.

Added some extra test cases to lists.html to cover list-style-image and
list-style-position parts of the list-style shorthand, and the `none`
values.
2021-08-14 12:45:01 +02:00
Sam Atkins
dcbfb61816 LibWeb: Implement and use BackgroundStyleValue
This one represents one secton of a `background` property, since it can
have multiple background values separated by commas. Eventually, we will
represent that as a List of BackgroundStyleValues.

Also modified some background-foo properties in StyleResolver so that
the is_background_x() functions could be removed.

I realized that our handling of var() in shorthand properties is wrong,
so have been removing the is_builtin_or_dynamic() calls from the parsing
code for shorthands. This broke our var() test page, so I have replaced
the use of 'background' with 'background-color' there.
2021-08-14 12:45:01 +02:00
Sam Atkins
59501f1940 LibWeb: Implement and use FontStyleValue
After working with the code for a while, it makes more sense to put all
the parsing in Parser, instead of some of it living in StyleResolver.
That means our current ValueListStyleValue needs to be replaced with
specific StyleValue types for the properties that are shorthands or
otherwise combine several values together.

Here we implement FontStyleProperty, which represents a `font` CSS
property.

Also adjusted the fonts.html test page so that font-weights are featured
in test cases without things we do not yet support.
2021-08-14 12:45:01 +02:00
sin-ack
0e5e6f2e08 Base: Convert postcreate scripts to use heredoc 2021-08-13 01:20:35 +04:30
Jean-Baptiste Boric
b1add5860b Base: Make /bin/Shell the login shell by default 2021-08-12 18:56:30 +02:00
Tobias Christiansen
193f1e01cf PixelPaint: Add the GuideTool to the Toolbox
This also adds a custom icon for the GuideTool.
2021-08-07 02:52:47 +04:30
Andreas Kling
7a8efa7771 Base: New icon for the Spreadsheet app
Let's have something that looks a little more like a spreadsheet. :^)
2021-08-03 10:21:00 +02:00
Sam Atkins
238ac8ac25 Base: Organize welcome.html
Previously, it was a big list of test pages in no particular order, and
it was hard to find anything. This commit breaks it up into sections,
and renames some of the links to be more consistent.

The categories are slightly arbitrary, and I'm sure everyone will have a
different opinion on what they should be, and which links should go
where. But hopefully we can all agree that this is an improvement!

This also wraps the list into multiple columns on browsers that support
it, which unfortunately does NOT include Browser. :^( But hey, once we
do it'll be good!
2021-08-03 09:12:45 +02:00
Andreas Kling
1f51b72e6d LibGUI: Add a simple GUI::PasswordInputDialog
Asking the user for a password is a fairly common thing, so let's have
a reusable GUI dialog for it! This first iteration only supports having
pre-filled "server" and "username" fields. This can obviously be made
more flexible as needs arise. :^)
2021-08-02 10:13:35 +02:00
Linus Groh
b5d9b4e7ee Base: Add a quote to fortunes.json 2021-08-02 00:29:08 +01:00
TheFightingCatfish
f67c2c97b1 Shell: Improve the parsing of history event designators 2021-08-02 02:58:55 +04:30
Andreas Kling
67c0a2c5df MailSettings: Use the same app icon as Mail
*Settings applications should use the same icon as the app they manage
the settings for.
2021-07-31 20:09:27 +02:00
Andreas Kling
0e678403af Base: Improve Mail app icon (32x32) 2021-07-31 20:09:27 +02:00
Andreas Kling
ad141a2286 Base: Remove "test.frm" from HackStudio test project 2021-07-31 20:09:27 +02:00
TheFightingCatfish
08359ba578 LibWeb: Fix regression of "contenteditable" attribute 2021-07-31 17:39:28 +02:00
Sam Atkins
d113bc7704 Base: Add CSS url(data:...) cases to test page
Also, it wasn't linked to from welcome.html, so now it is.
2021-07-31 00:18:11 +02:00
Sam Atkins
242c342fad Base: Expand test page for CSS attribute selectors
Now that we support more types of attribute selectors in the parser,
we need a way to test them. :^)
2021-07-31 00:18:11 +02:00
Sam Atkins
7439fbd896 LibWeb: Get CSS @import rules working in new parser
Also added css-import.html, which tests the 3 syntax variations on
`@import` statements. Note that the optional media-query parameter to
`@import` is not handled yet.
2021-07-31 00:18:11 +02:00
Faeliore
8e3431d56d MailSettings: Add basic mail settings dialog
MailSettings: Add a GML file for Mail settings

MailSettings: Add an AF desktop file for Mail Settings

MailSettings: Unveil /res in mail settings, fix GML

MailSettings: Mail settings texteditor->textbox

MailSettings: Update mail username to correct category in settings

Modified Mail settings GML to properly represent ports >100

MailSettings: Update/fix mail settings GML

MailSettings: Adjust GML, add icons for mail settings

MailSettings: Change Okay button to OK

MailSettings: Change mail setting reset button to revert

MailSettings: Fix incorrect variable names in mail settings

MailSettings: Add newlines af EOF of all mail setting files

MailSettings: Mail settings linting issues fixed

MailSettings: Increase size of icon features
Code cleaning/styling changes as per gunnarbeutner review
Made settings descriptions more friendly per sin-ack review

MailSettings: Fixes as per PR comments

MailSettings: Fix checkbox weirdness

MailSettings: Adjust width of checkbox

MailSettings: Remove unneccessary update() call

MailSettings: Replace port SpinBox with ComboBox

MailSettings: Add colons to labels, remove port 110 option

MailSettings: Remove custom model, use ItemListModel

MailSettings: Change relative icon paths to absolute ones
2021-07-30 20:47:31 +02:00
Faeliore
08ddfb30d7 Base: Remove coffee theme height and width metrics 2021-07-29 21:27:24 +01:00
Faeliore
9fff0c77dc Base: Make coffee theme icons smaller so they fit in the title bar
Fixes #4713
2021-07-29 21:27:24 +01:00
BuggieBot
6340aa11ce Base: Add a quote to the fortunes database
[skip ci]
2021-07-28 23:33:57 +01:00
Andreas Kling
e378587c82 LibGfx+Base: Add a themable "Accent" color role
This can be used by GUI widgets to draw attention to a specific part of
the widget, for example the currently active sub-widget component.
2021-07-28 20:21:52 +02:00
Maciej Zygmanowski
c42f5a9e56 Base: Add network-connected icon
It's just like network-disconnected but without red "X" mark.
2021-07-27 00:28:12 +02:00
Jamie Mansfield
eb28ca2081 Spider: Improve 32x32 icon
This now matches Andreas' nice 16x16 icon :)
2021-07-26 12:41:01 +02:00
Brian Gianforcaro
c95ac83367 Base: Mitigations(7) add -fzero-call-used-regs and Process Protection
Update the man page to describe more mitigations that we have applied.
2021-07-26 13:08:37 +04:30
Andreas Kling
689e7c28b7 Base: Make DisplaySettings have matching 16x16 and 32x32 icons 2021-07-26 02:03:29 +02:00
Andreas Kling
03040f1d10 Base: Improve 32x32 app icons for DisplaySettings and KeyboardSettings 2021-07-26 01:55:25 +02:00
Andreas Kling
1eeea5b4ae MouseSettings: Replace the scroll step size icon 2021-07-26 01:07:37 +02:00
Andreas Kling
87a22a77e9 Settings: Add a very simple Settings application
This is really just a launcher app that gathers all the installed apps
in the "Settings" category and presents them in a single window.
2021-07-26 00:39:10 +02:00
Andreas Kling
99f57d0a40 Base: Add descriptions to the apps in the Settings category :^) 2021-07-26 00:39:10 +02:00
Andreas Kling
c17304a8f6 Base: Replace the MouseSettings app icon with something nicer :^) 2021-07-26 00:39:10 +02:00
Tobias Christiansen
6502d79240 Base: Add test page for box-shadow 2021-07-24 22:16:48 +02:00
Egor Ananyin
6097578c59 Base: Add a test page for CSS opacity property 2021-07-24 22:02:28 +04:30
Luke
256c4ad0ca Base: Add man page for Mail
This is primarily used to give an example configuration file.
2021-07-24 20:11:28 +04:30
Luke
b716e902ba Mail: Add an e-mail application called Mail
This utilises LibIMAP and LibWeb to provide an e-mail client.

The only way currently to connect to a server and login is with a
config file. This config file should be stored in ~/.config/Mail.ini
Here is an example config file:
```
[Connection]
Server=email.example.com
Port=993
TLS=true

[User]
Username=test@example.com
Password=Example!1
```

Since this is stored in plaintext and uses a less secure login method,
I'd recommend not using this on your main accounts :^)

This has been tested on Gmail and Outlook. For Gmail, you either have
to generate an app password if you have 2FA enabled, or enable access
from less secure apps in your account settings.
2021-07-24 20:11:28 +04:30
Gamerappa
497a9afaaf Hearts: Redesign the icon
This does not fix the issue where there's no indication for when
hearts are broken. But since the original icon for Hearts was
a placeholder. This should be better. :^)

Fixes #7373
2021-07-24 07:30:47 +02:00
Tobias Christiansen
78757845bb Base: Add a test page for CSS 'calc()' values 2021-07-24 03:02:07 +04:30
Sam Atkins
68193c365f LibWeb: Resolve CSS text-decoration from value list
This detects and resolves these in the text-decoration property, in any
order:

- text-decoration-color
- text-decoration-line
- text-decoration-style

Only the solid underline renders, but all three sub-properties are
assigned correctly.
2021-07-22 23:09:01 +02:00
Sam Atkins
82f3228dd2 LibWeb: Resolve CSS font property from value list
The font property now resolves into its various parts:

- font-family
- font-weight
- font-size
- font-style
- line-height

The font-variant and font-stretch parts are left unparsed since LibWeb
doesn't know how to render those.

Added `fonts.html` as a test for various forms of `font` declarations,
based on the examples in the spec.
2021-07-22 23:09:01 +02:00
Sam Atkins
7abfb18656 LibWeb: Implement CSS color parsing from Tokens
This was broken when we switched away from using StringStyleValues.
While I was at it, I have implemented hsl/a() and the percentage
syntax for rgb/a().

As a bonus, added `colors.html` as a test page for the various CSS
color syntaxes, since nothing was testing rgb() or rgba() before.

Much of the parsing code in LibGFX/Color.h seems to be centered
around CSS color values, but this is not used by the new Parser.
(And can't be used, because it requires a String value and we have
a list of Tokens of some kind instead.) Maybe that should be removed
from there when the new CSS parser is operational.
2021-07-22 23:09:01 +02:00
Andreas Kling
027bfc4eff DesktopPicker: Make sure the applet always ends up in the same place 2021-07-22 09:17:01 +02:00
Andreas Kling
a34a9e8698 Base: More tweaks to the MouseSettings icons 2021-07-21 01:29:45 +02:00
Andreas Kling
c09071e166 Base: Fix imperfection in mouse-cursor-speed icon (MouseSettings) 2021-07-21 00:20:05 +02:00
Andreas Kling
81e6560009 MouseSettings: Give this application a GUI facelift :^)
Note that the double-click "icon" adapts to the double-click speed
and also reacts to double-clicks. :^)
2021-07-20 21:50:06 +02:00