Commit graph

186 commits

Author SHA1 Message Date
Dave Davenport
b77de4c00d [Theme] Accept just color for highlight 2021-11-08 21:46:55 +01:00
Dave Davenport
4face975a9 [Theme] Print known colors as color name.
When printing look if the set color has a known color name, print this.
2021-09-20 19:57:12 +02:00
Dave Davenport
562146730b
[THEME] I1442 Fix parsing of nested media blocks.
* [1442] Fix widget media nested
* [Theme] Fix memory leak in P_LIST
* [I1442] Support merging down default block.
2021-09-08 14:16:28 +02:00
Dave Davenport
3f5d82ff56 [Theme] Don't truncate double default value.
Fixes: #1419
2021-09-02 09:48:33 +02:00
Dave Davenport
0b83ab96ce [Theme] double inheritance integer fallback fix 2021-08-27 00:18:14 +02:00
Dave Davenport
e4d5c10e47 [Theme] Try to fix inheritance (2nd attempt). 2021-08-26 23:34:07 +02:00
Dave Davenport
3c8ca2390d [main] Try to fix default theme loading.
* Add more debug output on failing to load theme.
 * Don't load default theme, if empty theme is explicitly loaded.
2021-08-23 22:57:39 +02:00
Dave Davenport
c64565e877 [CppCheck] Fix some shadowing variables. 2021-08-21 01:08:40 +02:00
Dave Davenport
954fc728b2 [Cleanup] Using clang-tidy 2021-08-18 01:16:45 +02:00
Dave Davenport
18e118a250 [Theme] Fix inheritance copy paste error. 2021-08-17 11:21:07 +02:00
Dave Davenport
9f777a7a7b [Themes] Fix inheritance with state set.
Update theme.c and included themes.
This should allow you to set `element-text { text-color: inherit;
background-color: inherit;}` to fix old themes.
2021-08-14 13:58:21 +02:00
a1346054
c62137f8ab
Simple maintenance improvements (#1370)
* rofi moved to libera.chat

* unify some theme headers and whitespace

* consistently use the same hashbang for bash

* improve obsolete way of testing equality

see https://github.com/koalaman/shellcheck/wiki/SC2268 for explanation

* use consistent function definitions in bash scripts

* remove duplicated author and fix whitespace

* quote all variables in scripts

fixes many warnings identified through shellcheck

* fix whitespace in scripts

* fix whitespace in non-source files

* fix spelling in non-source files

* fix whitespace and indentation in source files

* fix spelling in source files
2021-08-14 13:03:16 +02:00
Dave Davenport
9f71c4f78d [Config] Load default config file in at startup
* load via resources doc/default_configuration.rasi
* print the configuration options on dump-config
2021-07-10 00:25:20 +02:00
Dave Davenport
370287c2ca [Theme] Remove listview backwards compatibility hack. 2021-07-02 18:06:06 +02:00
Dave Davenport
4c1a74e15e [Widget] Add scaling option to background-image. 2021-06-15 17:18:34 +02:00
Dave Davenport
0f21541327 [Configuration] Add start of more 'theme' based configuration.
Nested CSS blocks in configuration {} are parsed into
rofi_configuration.
2021-06-14 19:29:05 +02:00
Dave Davenport
828aaa231a [Theme] Add angle support to linear-gradient. 2021-06-14 16:04:15 +02:00
Dave Davenport
5c5428bd11 [Theme] Add direction support to linear-gradient. 2021-06-14 15:14:41 +02:00
Dave Davenport
7cf0385681 [Theme] Support multiple stops in linear-gradient
* Fix anchor dumping
* Fix image dumping
2021-06-13 22:57:35 +02:00
Dave Davenport
beccfe4178 [Widget] with background image, draw background-color first. 2021-06-13 21:41:31 +02:00
Dave Davenport
1e25ae03b7 [Widget] Extend the pattern when loading, good for bg patterns. 2021-06-13 21:35:42 +02:00
Dave Davenport
a0b8a05315 [Widget] Change scaling of background-image 2021-06-13 20:59:28 +02:00
Dave Davenport
2c325b3f09 [Widget] Add initial support for background-image.
* Supports url("path") and linear-gradient(start,stop).
2021-06-13 20:50:25 +02:00
Dave Davenport
9d85bcb914 Update copyright header. 2021-06-09 14:50:39 +02:00
Dave Davenport
dc46457f71 Remove deprecated theme options
* color_window
* color_urgent
* color_active
* color_normal
2021-06-08 22:44:15 +02:00
Dave Davenport
b478de3d7d Remove deprecated option, fix typo in manpage. 2021-06-08 22:02:29 +02:00
Dave Davenport
0db6412ae2 [Doc,Config] Remove line-margin|padding and fix doc mistake.
*Deprecated* option.
2021-06-08 12:17:59 +02:00
Dave Davenport
3598ebe603 [Config] Quick hackish workaround for handling dynamic options from config file
Quick hackish workaround for having options that are added *after*
config file is parsed.
This needs to be replaced once the config system is revamped.

Fixes: #905
2021-06-01 12:17:59 +02:00
TonCherAmi
dc28a97437
Add cursor property (#1313)
* Change mouse cursor on widget hover

Currently only listview element and editbox are supported.

* Add cursor property
2021-05-23 00:17:27 +02:00
Dave Davenport
7061eb21ae Indent round. 2020-11-03 23:57:02 +01:00
Dave Davenport
7c331b130b [Calc] Add min/max operator support to calc()
Fixes: #1172
2020-09-14 20:34:39 +02:00
Dave Davenport
3499e1dad0 [Theme] First attempt at more cleanups and nested media support.
First throw at nested media support.

Issue: #1189
2020-09-13 15:11:12 +02:00
Dave Davenport
0a3734dce4 [Theme] Fix @media printing in -dump-theme. 2020-09-13 13:48:48 +02:00
Dave Davenport
30735791b4 Run indenter. 2020-08-28 16:41:59 +02:00
nick87720z
fb2ba8ada3
Millimeter support for distance (#1144) 2020-06-09 22:19:43 +02:00
Dave Davenport
151547a99e
[Themes] add calc() support to distance in theme format. (#1105)
* Initial test to allow math in distances.

Support + and -
Needs spaces around + and -.

* [THEME] Fix printing theme with math in distance.

* [Theme] use calc() syntax.

* [Theme] Add * and /  to calc().

* [Theme] Fix the precedense ordering in parsing. Also avoid making copies.

* [Theme] Don't print unneeded ().

* [Theme] Add modulo to calc.
2020-04-24 19:54:08 +02:00
Dave Davenport
f63da72ea6 [Dmenu] Fix possible crash.
Don't pass empty string.

Issue: #1083
2020-04-06 23:31:45 +02:00
Dave Davenport
e0e6c5e670 Fix detection no theme. 2020-03-02 12:21:34 +01:00
Dave Davenport
b169289996 Indent all the code. 2020-02-02 13:56:37 +01:00
Dave Davenport
b03edc5cf3 Update copyright dates. 2020-01-01 12:23:12 +01:00
Dave Davenport
8d9e403659 Update copyright. 2019-09-27 11:58:32 +02:00
Dave Davenport
7c613f6a4c
Issue893: Add support for @media in the theme format. (#1015)
* [Lexer] Add support for @media.

Issue: #893

* [Theme] @media limit to px.

* [Theme@Media] add *{} support.

* [Theme@Media] Add support for monitor-id media.

* [Theme@Media] Code cleanup.

* [Theme@Media] Add min/max-aspect-ratio.

* [Theme@Media] Remove some debug output

Fixes: #893
2019-09-20 15:05:36 +02:00
qball
ad74da45d1 [Workaround] Add default icon size. 2019-08-17 22:57:05 +02:00
Dave Davenport
618d1396ee
Issue949 (#999)
* [Issue 949] Add initial split of listview row into widget tree.

Allowing better themeing.

* Remove unneeded code from textbox. allow dis. icons.

* Fix typo.

* Fix wrong widget offset in textbox.

* Fix mouse handling

* [ListView] Add 'fixed-columns' boolean option.

* [Listview] Fix inversion of option.

* [ListView] remove commented old code.

* [Textbox] Handle null pointer on desired width.

* [Listview] Fix crasher with fixed_columns and more max elements requested items.

* Add hack to get backwards compatibility for new listview structure.

* Fix the scrollbar test.

* Fix tests for theme update..
2019-08-08 20:02:20 +02:00
Quentin Glidic
4224614115
theme: Fix g_list_copy_deep() warning
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2019-04-19 10:10:07 +02:00
Dave Davenport
6fffe427c4 Change sidebar in theme to mode-switcher.
Fixes: #930
2019-03-19 22:45:10 +01:00
Dave Davenport
40da1b25e2 [Theme3.0] Change reference to use the CSS like var() syntax.
Supports defaults var(name, default); var(name);
Where default can be another property.
(https://www.w3schools.com/css/css3_variables.asp)

This deprecates the @name syntax.

Fixes: #876
2019-01-29 17:56:45 +01:00
Dave Davenport
859a9c79d6 Indent the code. 2018-08-08 15:55:13 +02:00
Dave Davenport
b8592f8b99 Documentation updates.
* theme,
* view,
* textbox
* helper
2018-06-12 12:00:00 +02:00
Dave Davenport
5ab0a642c9 [Theme] When reading double property, allow fallback to integer.
Otherwise the value '1' is not seen as valid entry, only '1.0'.

Fixes: #752
2018-01-14 11:21:02 +01:00