Commit Graph

3075 Commits

Author SHA1 Message Date
Andreas Kling
9526b0e13a LibHTML: Add InheritStyleValue and InitialStyleValue.
These correspond to the 'inherit' and 'initial' CSS values respectively.
2019-07-08 07:15:56 +02:00
Andreas Kling
105a97685e LibHTML: Fix host build after Libraries/ shuffle. 2019-07-08 07:14:18 +02:00
Andreas Kling
752d297321 IRCClient: Fix build. Forgot to update a function signature. 2019-07-07 22:27:48 +02:00
Andreas Kling
ea9340aeca IRCClient: Implement the "part from channel" action.
Also make sure the action is disabled while we're not in a window that
corresponds to an open channel. :^)

Fixes #277.
2019-07-07 21:58:57 +02:00
Andreas Kling
d47432487d GStackWidget: Add a notification hook for when the active widget changes. 2019-07-07 21:50:38 +02:00
Andreas Kling
8b0953a795 Libraries: Unbreak "make install" with new directory locations. 2019-07-04 16:41:42 +02:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Andreas Kling
63814ffebf LibHTML: Move CSS value parsing to CSSParser. 2019-07-04 15:49:16 +02:00
Andreas Kling
55a5c46253 AK: Add Vector::insert_before_matching(T&&, callback);
This allows you to do things like:

vector.insert_before_matching(value, [](auto& entry) {
    return value < entry;
});

Basically it scans until it finds an element that matches the condition
callback and then inserts the new value before the matching element.
2019-07-04 14:20:48 +02:00
Andreas Kling
57da8792fd Vector: Simplify functions that take both T&& and const T&.
We can implement foo(const T&) by invoking foo(T&&) with a temporary T.
2019-07-04 13:54:37 +02:00
Andreas Kling
1791ebaacd WindowServer: Convert dbgprintf() in WSWindowManager to dbg().
Here goes the first trial run for the new LogStream mechanism.
I like it so far. :^)
2019-07-04 07:07:40 +02:00
Andreas Kling
1b013ba699 AK: Move some of LogStream out of line & add overloads for smart pointers. 2019-07-04 07:05:58 +02:00
Andreas Kling
07d11a9b6b SharedGraphics: Add LogStream operator<<'s for Rect, Point and Size. 2019-07-04 06:45:50 +02:00
Andreas Kling
05cc59921a AK: Start fleshing out LogStream, a type-aware logging mechanism.
The first implementation class is DebugLogStream, which can be used like so:

    dbg() << "Hello friends, I am " << m_years << " years old!";

Note that it will automatically print a newline when the object created by
dbg() goes out of scope.

This API will grow and evolve, so let's see what we end up with :^)
2019-07-04 06:43:30 +02:00
Andreas Kling
27f699ef0c AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>:

* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00
Dan MacDonald
c4c4bbc5ba Build: Use sudo -E to preserve EVs when calling build-image-qemu.sh from makeall.sh 2019-07-03 18:12:16 +02:00
Dan MacDonald
0d19a4eaab Build: Fix incorrect user and group settings for disk image (#280)
Build: Fix incorrect user and group settings for disk image.

Fixes #261.
2019-07-03 16:57:37 +02:00
Andreas Kling
b79112e6d6 AK: Add String::number() for creating a String from a number.
Instead of manually doing String::format("%d"/"%u") everywhere, let's have
a String API for this. It's just a wrapper around format() for now, but it
could be made more efficient in the future.
2019-07-03 14:56:27 +02:00
Andreas Kling
8ac2b30de7 LibHTML: Add LengthStyleValue and create those when parsing number values. 2019-07-03 07:55:22 +02:00
Andreas Kling
4b82ac3c8e LibHTML: Rename LayoutStyle => ComputedStyle. 2019-07-03 07:25:04 +02:00
Andreas Kling
c7cf6f00fc LibHTML: Let the layout tree own the style tree.
Each layout node is now constructed with an owning back-pointer to the style
tree node that originated it.
2019-07-03 07:19:29 +02:00
Christopher Dumas
e9ab282cfd Launcher: Reformat config a little bit (#279) 2019-07-03 05:53:44 +02:00
Andreas Kling
d2ec64ace0 Launcher: The "Launcher" config file group shouldn't take up visual space.
Also tweak Launcher.ini since CConfigFile bools are 1/0 rather than
true/false. We should probably use true/false. Or switch over to JSON.
2019-07-02 21:49:00 +02:00
Christopher Dumas
8a2123e385 Launcher: Vertical/Horizontal option 2019-07-02 13:29:14 +02:00
Dan MacDonald
0b1ff2d0eb Userland: Don't return an error when jp is run without arguments 2019-07-02 10:32:49 +02:00
Dan MacDonald
362ac8f1ba Ports: Force curl to follow redirects in run_fetch_web() (#266)
This fixes downloading files from github when building ports.
2019-07-01 20:57:46 +02:00
Andreas Kling
54d7670fc3 Kernel+Userland: Convert /proc/df to JSON. 2019-07-01 18:54:02 +02:00
Andreas Kling
aaedc24f15 Kernel+ProcessManager: Convert /proc/memstat to JSON. 2019-07-01 18:43:01 +02:00
Andreas Kling
438a14c597 Terminal: Track which character cells have had something printed in them.
This helps us figure out where lines end, which we need when computing the
selected text for copy-to-clipboard. :^)
2019-07-01 18:14:08 +02:00
Andreas Kling
33ac0de988 LibHTML: Add Length and LengthBox classes.
We need a way to represent values that are "auto", so adding a Length class
seems like the easiest way to achieve that.
2019-07-01 17:17:32 +02:00
Andreas Kling
a190f67450 AK: Add u8/u16/u32/u64 and i8/i16/i32/i64 typedefs.
These are more explicit and will be immediately understandable unlike the
old types which assume that you're in an IA-32 headspace. :^)
2019-07-01 15:58:21 +02:00
Andreas Kling
83df654904 Meta: Add note about rebuilding after pulling new changes.
Fixes #260.
2019-07-01 14:33:31 +02:00
Andreas Kling
24c0aae34e Build: Remove Userland/qs if we see one lying around.
Userland/qs was moved to Applications/QuickShow, but some people still have
old built binaries lying around in their Userland/ directories and the build
system complains about this. Here goes a silly temporary hack to just get
rid of them.
2019-07-01 14:33:30 +02:00
Andreas Kling
2daf89e2f7 Ports: Fix SDL2 port trying to build against PulseAudio for some reason.
I didn't look into why, but for some reason the SDL2 cmake build system
thinks it should build against PulseAudio which we definitely don't have.
So just tell it explicitly not to do that.

Fixes #265.
2019-07-01 14:08:15 +02:00
Jookia
eb4c42bfa8 Minesweeper: Move configuration reading to Field
This makes more sense as it's where configuration writing happens.
2019-07-01 09:51:03 +02:00
Jookia
9dbf453015 Minesweeper: Allow single-click chording
This is how other Minesweeper games I've played usually behave.
Single-click chording can be disabled from the menu or config file.
2019-07-01 09:51:03 +02:00
Jookia
d2b6f79835 CConfigFile: Implement write_bool_entry 2019-07-01 09:51:03 +02:00
Rhin
070a2f8980 LibGUI: GScrollbar compression when very small (#255)
Fixes #124.
2019-07-01 09:46:36 +02:00
Andreas Kling
9ca453d8c9 LibHTML: LayoutDocument should call LayoutBlock parent constructor. 2019-07-01 08:01:30 +02:00
Andreas Kling
7a9d5e2a69 LibHTML: Let's not support CSS shorthand properties right away.
This will simplify style building right now, and we can come back later
and implement shorthand expansion.
2019-07-01 07:33:21 +02:00
Andreas Kling
22fec1a250 LibHTML: Start fleshing out block layout.
The basic idea of block layout is: width, then children based on width,
then height based on height of children.
2019-07-01 07:31:04 +02:00
Andreas Kling
f1a0e8b8e6 LibHTML: The document node should have a LayoutDocument representative.
This will be a special LayoutBlock that provides the ICB dimensions based
on the containing frame.
2019-07-01 07:27:17 +02:00
Andreas Kling
0bfa864021 LibC: Fix -Werror build in new strtol(). 2019-07-01 06:37:36 +02:00
Christopher Dumas
df34de369b LibC: New implementation of strtol (NIH) (#263)
Fixes #189.
2019-07-01 06:07:10 +02:00
Andreas Kling
c70fbca23a QuickShow: Make the window background black for a nicer contrast. 2019-06-30 17:22:12 +02:00
Andreas Kling
575acfac98 WindowServer: Add a separator before "close" in window menus. 2019-06-30 15:59:11 +02:00
Andreas Kling
1fa467a424 Launcher: Tighten up the widget layout a bit. 2019-06-30 15:58:53 +02:00
Andreas Kling
daf44d5ec5 Terminal: Unbreak single-line text selection. 2019-06-30 15:11:56 +02:00
Andreas Kling
f6498bb0e9 Kernel: Make more crash info show up in dmesg.
kprintf() shows up in dmesg, dbgprintf() does not.
2019-06-30 15:02:23 +02:00
Andreas Kling
038f99eeff QuickShow: When zooming with the mouse wheel, keep image centered at cursor. 2019-06-30 15:01:35 +02:00