Commit Graph
220 Commits
Author SHA1 Message Date
Kovid Goyal d9c400ac32 Forgot to recalculate height_gl leading to vertically stretched characters for window numbers 2021-11-04 08:53:17 +05:30
Kovid Goyal 477baf390b DRYer 2021-11-03 09:32:49 +05:30
pagedown ce36b09593 Visible bell color falls back to default fg when selection bg is none 2021-11-03 10:07:57 +08:00
pagedown b4a6ed8d8f Allows the visual bell color to be configured 2021-11-02 19:38:36 +08:00
Kovid Goyal 588313b9ac Dont re-render window chars unless needed 2021-11-01 20:38:19 +05:30
Kovid Goyal 9517c3500d Allow visually selecting upto 36 windows
Also dont draw the window title if the window is too small
2021-11-01 10:46:54 +05:30
Kovid Goyal 1b8978fede Implement rendering of ASCII char with FreeType 2021-11-01 10:17:26 +05:30
Kovid Goyal 5796cbc040 Remove the seven segment shader 2021-11-01 08:42:02 +05:30
Kovid Goyal 49726384f7 Start work on rendering visual select numbers using fonts instead of seven segment display 2021-11-01 08:40:03 +05:30
Kovid Goyal e7386735f4 Make code to load alpha mask texture re-useable 2021-11-01 07:29:04 +05:30
Kovid Goyal ddfa653197 resizing size text should be drawn with the current foreground color 2021-11-01 07:19:17 +05:30
itepechi 9289c2de69 Refactor background_image_anchor for cleaner code 2021-10-30 04:34:33 +09:00
itepechi dac1612cb0 Calculate background image position on the GPU 2021-10-30 04:34:33 +09:00
itepechi 87d79c7415 Change the naming of directions in option background_image_anchor for consistency
Replaced cardinal directions with "relative" directions.
2021-10-30 04:34:33 +09:00
itepechi 86d7aaa03a Add clamped to option background_image_layout 2021-10-30 04:34:33 +09:00
itepechi cae31ab336 Read/Write bganchor directly from the options' state
Slight performance improvement, maybe?
Also, `kitty/graphics.h` has been reverted to the original version;
this version would be better in that aspect too.
2021-10-30 04:34:32 +09:00
itepechi 2aa01c58a1 Add option background_image_anchor to configure bgimage position 2021-10-30 04:34:32 +09:00
Kovid Goyal ce823e4b08 Fix incorrect scissoring for window resize counter
It uses draw_graphics, which uses a scissor, but the scissor was set by
the last call to draw_cells() which is not called during a resize,
leaving us with an incorrect scissor.

Fixes #4160
2021-10-28 21:45:15 +05:30
Kovid Goyal 702bfccfa2 Allow reverse video for the mouse selection
Fixes #646
2021-10-28 15:01:48 +05:30
Kovid Goyal 28386cc496 Fix nulling selection_fg not working 2021-10-28 14:38:35 +05:30
Kovid Goyal c06a03ab96 Avoid very low contrast colors for reverse video cursor 2021-10-28 14:14:38 +05:30
Kovid Goyal 93dbcab10a Refactor code to get cell colors 2021-10-28 13:35:30 +05:30
Kovid Goyal 0fdafd8398 Allow rendering the cursor with reverse video
Also clean up handling of dynamic global colors.
TODO: Implement none for selection_fg
TODO: Add some tests
TODO: Check that changing colors via remote control works

Fixes #126
2021-10-28 00:21:12 +05:30
Kovid Goyal 4385acd3c6 A new option to set the tab bar margin color independently 2021-10-25 12:21:46 +05:30
Kovid Goyal 426815f7ab Silence CodeQL warning 2021-10-17 10:32:25 +05:30
Kovid Goyal 78c63e6a18 Show window titles during visual select
Still has to be implemented on macOS
2021-10-15 14:19:56 +05:30
Kovid Goyal 372c4da8f9 When drawing cells make the window object available 2021-10-15 10:25:11 +05:30
Kovid Goyal 3c2e521dd7 Make blending of foreground more efficient
Avoids an unnecessary reversal of premultiplication when rendering
interleaved.  Also fixes rendering on wayland which for some reason was
using a different blend function than X11. Fixes #4120
2021-10-14 21:31:20 +05:30
Kovid Goyal c3f4e734f1 API to set screen window number 2021-10-11 18:00:18 +05:30
Kovid Goyal 85db87a121 A shader to draw a single seven segment number over a kitty window 2021-10-11 11:13:29 +05:30
Kovid Goyal be439cb887 When a tab_bar_background is specified it should extend to the edges of the OS window
Fixes #4054
2021-09-23 20:12:30 +05:30
Kovid Goyal 9c4a890688 Adjust attenuation based on color 2021-08-11 12:41:09 +05:30
Kovid Goyal 5c7ce18379 Move visual bell code into shaders.c 2021-08-11 12:04:52 +05:30
Andrew Mayorov aff6fdfa84 Make visual bell flash much more gentle
Right now visual bell makes background flash sharply with bright white
(when configured with darkish color theme). This causes eye strain,
especially prominent in unlit environments.

This change makes background bounce smoothly between regular bg color
and highlight (selection) bg color for the configured visual bell
duration. Intensity is animated with cubic easing functions. It
currently peaks at 20% of the duration, this is hardcoded.

Mark functions computing intensity and easing as inline

Do smarter blending of visual bell flash

Blend highlight color with pegtop's softlight mode over both background
and half as much over foreground. This should help with flash visibility
in light themed and inverted colors contexts.

Blend flash in BACKGROUND pass also

Revert "Do smarter blending of visual bell flash"

This reverts commit 9a269d55c7d04334b1c4891c42914423517dfad6.

Revert "Blend flash in BACKGROUND pass also"

This reverts commit 756332cb9d7576b08db78406e37349aa6d1df156.

Revert "Make visual bell flash much more gentle"

This reverts commit cbfe5d59ada2da690e14c7532a7468b0c307c462.

Render flash overlay in a separate drawcall

Trigger frequent repaints to make for smooth animation

Attenuate flash a bit more
2021-08-11 11:54:43 +05:30
Kovid Goyal be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal 521f921424 Fix a bunch of code scanning warnings 2020-07-07 09:52:59 +05:30
Kovid Goyal 7824739034 Ensure selection GPU buffer is refreshed after a resize
Fixes #2747 (I hope since I cannot reproduce)
2020-06-13 22:59:46 +05:30
Kovid Goyal 3d2cb37af0 Linux: Workaround for broken Nvidia drivers for old cards
Fixes #456
2020-05-18 13:41:23 +05:30
Kovid Goyal 4f4d562670 Fix background_tint making the window semi-transparent
Fixes #2618
2020-05-09 09:06:18 +05:30
Kovid Goyal 3bff3bcbe4 Fix selection not updating properly while scrolling
Fixes #2442
2020-03-18 18:48:59 +05:30
Kovid Goyal a4cc10c41b More typing work 2020-03-04 06:10:57 +05:30
Kovid Goyal 3a64b835fb DRYer 2020-02-26 07:28:39 +05:30
Kovid Goyal ce308286df Dont need to bind blit vertex array as cells vertex array is already bound 2020-02-02 20:56:42 +05:30
Kovid Goyal 7432a7f346 Bind empty VAO when tinting 2020-02-02 14:48:47 +05:30
Kovid Goyal 0830fc3b5a Make background_image tint useable even without a background image in a transparent window 2020-02-02 12:40:29 +05:30
Kovid Goyal ab2c901e85 Implement bg image tint for transparent windows 2020-02-02 12:34:35 +05:30
Kovid Goyal 3774cc54c7 Fix rendering of semi-transparent bg images in semi-transparent windows
Output colors must be premultiplied
2020-02-02 11:45:48 +05:30
Kovid Goyal 330ed8e4ae Add an option to tint background images using the current background color
Note still has to be implemented for transparent windows
2020-02-02 11:22:21 +05:30
Kovid Goyal 8116ee015a API for changing the background image of OS windows
Uses reference counting
2020-02-01 09:17:41 +05:30
Kovid Goyal eb60464177 No need to zero background opacity
We anyway dont draw the default background color in
draw_interleaved(_premult)
2020-01-31 18:51:02 +05:30