1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-10-02 15:09:07 +00:00
Commit Graph

30 Commits

Author SHA1 Message Date
Brenden Matthews
de3bd0c2eb Add some colour tests. 2023-02-24 19:41:02 -05:00
Brenden Matthews
a39015b7bd
Apply clang-format. 2023-02-24 08:43:15 -05:00
bi4k8
4a7bec5ba6
Premultiply background colors for X11 (#1421)
* initialize XColor/XftColor

this does not change behavior, but avoids passing uninitialized data to X/Xft functions

* gui, x11: move have_argb_visual to x11 files

this variable only has meaning with respect to X11

* x11: clear have_argb_visual if the setting changes to false

otherwise, we may try to use colors with alpha when we no longer requested a 32-bit visual

* x11: premultiply alpha of background colors

* x11: clean up set_foreground_color a bit

---------

Co-authored-by: bi4k8 <bi4k8@github>
2023-02-24 08:13:48 -05:00
bi4k8
5e98c49c4c
use new Colour type for specials and gradients (#1418)
* gradient, colours: use 24-bit colour depth internally on Wayland

our Colour type assumes this anyway; lower colour depth should be handled by display backends

* core: restore gradient color computation

this was mistakenly disabled when moving to a unified Colour representation

* core, gradient: use Colour type

* tests: gradient: always test hsv/hcl

colour computations no longer depend on the display backends we compile with, so these can be tested unconditionally now

* gradients, specials: use Color type

this makes specials now accept color names as well as hex codes, and removes all notions of color depth from gradient calculations

---------

Co-authored-by: bi4k8 <bi4k8@github>
2023-02-24 08:13:19 -05:00
bi4k8
9ab51edf9f ncurses: allocate custom colors
color0-9 will now use their configured RGB values exactly
2023-02-06 10:15:34 -05:00
bi4k8
ec24079a3a remove x11 dependency for color parsing
this means we can use the same, portable color-parsing code
everywhere, including ncurses
2023-02-06 10:15:34 -05:00
bi4k8
a72902fa35 add Colour type and use it pervasively 2023-02-06 10:15:34 -05:00
Caio Freitas de Oliveira
ac7887ad09 refactor gradients to use config value instead of hard-coded option 2022-10-12 21:35:35 -04:00
Brenden Matthews
0f3c706336 Replace temporary colour array with smart pointer.
This should fix #1070.
2021-03-04 09:56:20 -05:00
Brenden Matthews
3c43c4c7fe Refactor hsv code. 2021-03-03 12:19:20 -05:00
Brenden Matthews
308f2cb8ea
Update copyright, authors. 2021-02-27 09:14:19 -06:00
isaac
36d685eb88 refactor and unit test 2021-01-23 18:00:53 -06:00
isaac
d25e0a72f4 added hsv gradient 2021-01-23 18:00:53 -06:00
lasers
7eec746b82 update copyright year to 2019 2019-01-05 11:15:36 -06:00
Brenden Matthews
eebc8c653b
Add formatting/static analysis (#486)
* Reform source with clang-format.

Rules applied with:
    $ find . -iname *.h -o -iname *.cc | xargs clang-format \
        -style=file -i -fallback-style=google

* Add clang-format and analyze to build.

Based on the excellent work at: https://github.com/ttroy50/cmake-examples

* Clean up CMake stuff on macOS.

* Remove vim/emacs modelines.

* Update copyright dates.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.
2018-05-12 12:03:00 -04:00
Brenden Matthews
ddef05d4eb Update version, copyright. 2012-05-03 16:34:44 -07:00
Pavel Labath
b8bed06cc8 C++ version of get_x11_color() 2010-02-28 12:26:18 +01:00
Pavel Labath
54630eb39e Header housekeeping: remove unneeded extern "C", add modelines, add inclusion guards
hopefully, this doesn't break anything
2010-02-25 21:50:50 +01:00
Brenden Matthews
3e3dd16367 Update modelines and stuff. 2010-01-06 19:45:19 -08:00
Brenden Matthews
d3a8c4d22e timed_thread
Convert everything (everything? maybe missed some stuff) from old
timed_thread to new timed_thread.
2010-01-04 19:21:12 -08:00
Brenden Matthews
cf9e498b24 Update copyright notices. 2010-01-01 15:46:17 -08:00
Brenden Matthews
b6331b4eb6 Switch some more bits to C++, more CMake changes. 2009-12-09 20:05:32 -08:00
Phil Sutter
346b4cfbc1 move get_x11_color() to colours.c 2009-11-22 21:07:42 +01:00
Brenden Matthews
043cf686c6 Revert "Uhh..ansohus"
This reverts commit 9827726ae5.

Or this.
2009-08-07 01:24:24 -06:00
Brenden Matthews
9827726ae5 Uhh..ansohus 2009-08-06 00:54:40 -06:00
Cesare Tirabassi
81c691d15a add emacs indentation variables to source files in line with current vim settings 2009-07-28 23:44:22 +02:00
Brenden Matthews
ed5dbc02bb Simplify graph gradient stuff. 2009-05-26 11:44:16 -06:00
Brenden Matthews
d65c33146e OMPtimize the gradient stuff. 2009-05-26 03:14:52 -06:00
Brenden Matthews
f05829ad9a Update copyright stuff, fix conky.conf weirdness. 2009-03-29 22:55:51 -06:00
Phil Sutter
e28f79a133 split off specials from conky.c
As a side effect, font and colour specific stuff got outsourced, too.
This is because the apropriate functions are used by conky.c as well as
specials.c, so they should be kept on their own.

In the long term I hope for positive impact on the X11 integration mess.
(Take e.g. the mass of X11 ifdefs cluttering conky.c.) Though this
commit contains no optimisations in this direction, just plain
outsourcing, to ensure minimised (intended: none) changes to conky's
interface behaviour.
2009-02-22 19:04:33 +01:00