Andreas Kling
92627154a7
FileManager: Add basic thumbnailing of PNG images.
...
These use nearest neighbor and are computed synchronously on directory load
so it's neither fast nor very beautiful. These issues both need work on
other parts of the system to fix.
2019-03-23 12:37:33 +01:00
Andreas Kling
86570d3b1a
SharedGraphics: Add Painter::draw_scaled_bitmap().
...
It's just a simple nearest-neighbor scale with alpha blending but it gets
the job done.
2019-03-22 04:20:10 +01:00
Andreas Kling
7c0a185970
Use the PNG loader for all images, and get rid of the .rgb files.
2019-03-22 00:21:03 +01:00
Andreas Kling
796bc56a13
PNGLoader: Reduce unfiltering branchiness even more.
...
Use a dummy scanline for y=0 filled with all zeroes to avoid having to check
y on every iteration before grabbing color data from scanline[y - 1].
2019-03-21 16:55:31 +01:00
Andreas Kling
cd1afde48c
PNGLoader: Templatize the unfiltering functions to reduce branchiness.
...
This also allows us to dodge processing alpha values in non-alpha PNGs
without a branch.
2019-03-21 16:45:04 +01:00
Andreas Kling
cfc521d57e
PNGLoader: Reorganize the unfiltering code to make it easier to work with.
2019-03-21 16:19:11 +01:00
Andreas Kling
fe25f957e5
PNGLoader: Allocate enough space for the compressed data buffer up front.
...
This is a 2x speedup on wallpaper loading.
2019-03-21 14:08:14 +01:00
Andreas Kling
332b5a96f6
PNGLoader: Remove a bunch of unnecessary data copying.
...
Use ByteBuffer::wrap() to avoid copying buffers around a bit. This is about
a 10% speedup on loading a wallpaper-type PNG.
2019-03-21 13:58:40 +01:00
Andreas Kling
65348e7dc1
PNGLoader: Support for color type 2 (RGB triplets) and multiple IDAT chunks.
2019-03-21 05:25:54 +01:00
Andreas Kling
42755e98cf
SharedGraphics: Implement a simple PNG decoder.
...
This is extremely unoptimized, but it does successfully load "folder32.png"
so it must be at least somewhat correct. :^)
2019-03-21 03:57:42 +01:00
Andreas Kling
67009cee8e
IRCClient: Add ability to change nickname.
2019-03-20 04:21:58 +01:00
Andreas Kling
e15cc4509f
LibGUI: More GInputBox refinements.
...
Fix some GBoxLayout bugs to make the buttons in GInputBox line up better.
There are still some imperfections due to rounding errors.
2019-03-19 03:00:42 +01:00
Andreas Kling
55aa819077
IRCClient: Colorize some channel messages (joins, parts, topics)
2019-03-18 20:56:45 +01:00
Andreas Kling
f4b8e4966f
SharedGraphics: Add Color::to_string().
...
This generates a string in the format "rgba(%d, %d, %d, %d)".
2019-03-18 04:53:09 +01:00
Andreas Kling
4e451c1e92
Add client-side double buffering of window backing stores.
...
This prevents flicker and looks rather good. The main downside is that
resizing gets even more sluggish. That's the price we pay for now.
2019-03-17 04:23:54 +01:00
Andreas Kling
1c6dfc3282
AK: Make ByteBuffer's copy() and wrap() take void*.
...
This way we don't have to cast whatever we're passing to copy()/wrap().
2019-03-17 00:36:41 +01:00
Andreas Kling
ffe4522316
SharedGraphics: Allow passing a Font to text drawing functions.
...
This way we don't have to juggle around with calls to Painter::set_font()
which simplifies a bunch of places.
2019-03-09 21:24:12 +01:00
Andreas Kling
b8f999cbef
About+LibGUI: Use a GBoxLayout for the About app.
2019-03-09 21:09:29 +01:00
Andreas Kling
88f6ce152f
SharedGraphics: Add PainterStateSaver RAII helper and Point::operator-().
...
Two little things to help tidy up a bit in WSWindowManager.
2019-03-09 16:54:41 +01:00
Andreas Kling
f7097d21f6
SharedGraphics: Give painter a state stack and save()/restore() operations.
...
This will make some painting code a lot less confusing since there's no
need to manually undo translations, clips, etc.
2019-03-09 16:48:02 +01:00
Andreas Kling
eda0866992
Add a C++ helper class for working with shared buffers.
...
This is a bit more comfortable than passing the shared buffer ID manually
everywhere and keeping track of size etc.
2019-03-08 12:24:05 +01:00
Andreas Kling
949c98c5af
LibGUI: Implement GToolbar separators.
2019-03-07 23:01:36 +01:00
Andreas Kling
9867fe1025
GTextEditor: Add a ruler column that always shows the line numbers.
2019-03-07 20:05:05 +01:00
Andreas Kling
ce35cddb1b
GTextEditor: Let's use a Vector for the line backing store.
...
I'm eventually gonna want to replace this with something more clever,
like a automagically splicing vector or something, but for now, at least
we move away from immutable Strings.
2019-03-07 14:35:32 +01:00
Andreas Kling
1ac71d1fb1
GTextEditor: Improvements to cursor rendering.
...
The view now scrolls along with you as you move the cursor around.
2019-03-07 13:13:25 +01:00
Andreas Kling
31d6b640eb
Add a bold variant of Katica and make that the system's default bold font.
...
..and do some minor tweaks to the font rendering code.
2019-03-06 14:50:27 +01:00
Andreas Kling
66a5ddd94a
More work on the variable-width font support.
...
Katica is now the default system font, and it looks quite nice. :^)
I'm gonna need to refine the GTextBox movement stuff eventually,
but it works well-enough for basic editing now.
2019-03-06 14:06:40 +01:00
Andreas Kling
7f6c81d90f
Implement basic support for variable-width fonts.
...
Also add a nice new font called Katica. It's not used anywhere yet but
I'm definitely itching to start using it. :^)
2019-03-06 12:52:41 +01:00
Andreas Kling
0a86366c71
Make a preparation pass for variable-width fonts.
2019-03-06 11:03:10 +01:00
Andreas Kling
91031346e5
Kernel: More signal handling improvements.
...
Finally fixed the weird flaky crashing when resizing Terminal windows.
It was because we were dispatching a signal to "current" from the scheduler.
Yet another thing I dislike about even having a "current" process while
we're in the scheduler. Not sure yet how to fix this.
Let the signal handler's kernel stack be a kmalloc() allocation for now.
Once we can do allocation of consecutive physical pages in the supervisor
memory region, we can use that for all types of kernel stacks.
2019-03-05 12:52:35 +01:00
Andreas Kling
ef4d517429
LibGUI: Tweak focus appearance and add it to GTableView.
2019-03-04 10:12:09 +01:00
Andreas Kling
483e0a5526
SharedGraphics: Add Rect::center_within(Rect).
2019-03-03 13:34:50 +01:00
Andreas Kling
b5e5f26a82
Base: Add Csilla Bold 7x10 variant.
...
It's nice to have a thin and a bold variant to complement each other.
2019-03-01 02:50:50 +01:00
Andreas Kling
0776c51bf5
Base: Import a new font, Csilla Thin (7x10).
...
I wanted to do a bitmap font with an odd number of columns for a while
and I finally got around to it. This really looks rather nice, so I'm
making it the default system font for now. :^)
2019-03-01 01:52:20 +01:00
Andreas Kling
fd428d6ed3
SharedGraphics: Make Painter clipping work with translated clip origin.
2019-02-28 18:57:36 +01:00
Andreas Kling
b4c20789fb
LibGUI: Allow specifying per-column text alignment.
2019-02-28 11:27:04 +01:00
Andreas Kling
40c8dd80d1
LibGUI: Draw separators between GTableView column headers.
2019-02-28 11:04:03 +01:00
Andreas Kling
9624b54703
More moving towards using signed types.
...
I'm still feeling this out, but I am starting to like the general idea.
2019-02-25 22:06:55 +01:00
Andreas Kling
901b7d5d91
Fix a bunch of compiler warnings. Not all, but a lot.
2019-02-25 19:05:51 +01:00
Andreas Kling
15fb917f28
Convert more RetainPtr use to Retained.
2019-02-25 16:04:08 +01:00
Andreas Kling
2cfcbdc735
AK: Add Retained<T>, like RetainPtr, but never null.
...
Also use some Clang attribute wizardry to get a warning for use-after-move.
2019-02-25 12:43:52 +01:00
Andreas Kling
75b100673f
Switch over to building everything with i686-elf-g++.
2019-02-22 10:45:32 +01:00
Andreas Kling
6084cd0c56
Add concept of size increments to windowing system.
...
Use this to implement incremental resizing for Terminal so that we only
ever resize to fit a perfect number of rows and columns.
This is very nice. :^)
2019-02-21 00:21:23 +01:00
Andreas Kling
fa02d2a39b
Rework the rendering model so that clients instantiate backing stores.
...
This makes interactive resizing work a lot better, althought it's still not
perfect. There are still glitches and unpleasant flashes of zeroed memory.
2019-02-20 22:08:14 +01:00
Andreas Kling
b704d3d295
LibGUI: Add a GToolBar class that can be populated with GActions.
...
The same action can be added to both a menu and a toolbar.
Use this to put a toolbar into FileManager. This is pretty neat. :^)
2019-02-20 02:39:46 +01:00
Andreas Kling
210646edd2
SharedGraphics: Minor tweaks in rect shattering code.
2019-02-19 16:37:12 +01:00
Andreas Kling
98784ad3cb
WindowServer: Avoid overdraw by shattering dirty rects into unique shards.
...
The algorithm I came up with is O(n^2) but given the small numbers of rects
we're typically working with, it doesn't really matter. May need to revisit
this in the future if we find ourselves with a huge number of rects.
2019-02-19 14:49:23 +01:00
Andreas Kling
9b71307d49
WindowServer: Support windows with alpha channels. And per-WSWindow opacity.
...
This patch also adds a Format concept to GraphicsBitmap. For now there are
only two formats: RGB32 and RGBA32. Windows with alpha channel have their
backing stores created in the RGBA32 format.
Use this to make Terminal windows semi-transparent for that comfy rice look.
There is one problem here, in that window compositing overdraw incurs
multiple passes of blending of the same pixels. This leads to a mismatch in
opacity which is obviously not good. I will work on this in a later patch.
The alpha blending is currently straight C++. It should be relatively easy
to optimize this using SSE instructions.
For now I'm just happy with the cute effect. :^)
2019-02-19 01:42:53 +01:00
Andreas Kling
c81b217fa7
SharedGraphics: Assign a human-friendly name for mmapped GraphicsBitmap.
2019-02-17 09:41:26 +01:00
Andreas Kling
9b2b9fe39b
SharedGraphics: Fix #ifdef mismatch in Painter.
...
This mistake created an incredible amount of confusion. We would allocate
a slightly too small Painter on the stack and then invoke its constructor,
overwriting whatever came after it on the stack.
2019-02-17 00:52:17 +01:00