Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philipp Erhardt
katarakt
Commits
ad212f78
Commit
ad212f78
authored
Oct 09, 2015
by
Philipp Erhardt
Browse files
Implement stylesheet config option
Thanks to thorsten!
parent
35660a00
Changes
4
Show whitespace changes
Inline
Side-by-side
doc/katarakt.txt
View file @
ad212f78
...
...
@@ -181,6 +181,21 @@ VARIABLES
katarakt instance, then the other katarakt window is activated instead.
'string' *icon_theme* ::
The name of your icon theme. Fill in if auto detection fails.
'string' *stylesheet* ::
See link:http://doc.qt.io/qt-4.8/stylesheet.html[]. It can be overridden
via Qt's *-stylesheet* command line option. The following example changes
the 'goto page' bar: +
+
----
stylesheet="
GotoLine {
margin: 0px;
padding: 4px;
border-top-right-radius: 6px;
border-top: 1px solid black;
border-right: 1px solid black;
}"
----
'int' *click_link_button* ::
1: The mouse button used for clicking links. Buttons 1-5 are supported.
...
...
share/katarakt.ini
View file @
ad212f78
...
...
@@ -18,6 +18,7 @@ thumbnail_size=32
rect_expansion
=
2
quit_on_init_fail
=
false
icon_theme
=
stylesheet
=
click_link_button
=
1
drag_view_button
=
2
select_text_button
=
1
...
...
src/config.cpp
View file @
ad212f78
...
...
@@ -42,6 +42,7 @@ void CFG::init_defaults() {
defaults
[
"quit_on_init_fail"
]
=
false
;
defaults
[
"single_instance_per_file"
]
=
false
;
defaults
[
"icon_theme"
]
=
""
;
defaults
[
"stylesheet"
]
=
""
;
// mouse buttons
defaults
[
"click_link_button"
]
=
1
;
...
...
src/main.cpp
View file @
ad212f78
...
...
@@ -111,6 +111,11 @@ int main(int argc, char *argv[]) {
}
}
// load stylesheet from config if no stylesheet was specified on the command line
if
(
app
.
styleSheet
().
isEmpty
())
{
app
.
setStyleSheet
(
CFG
::
get_instance
()
->
get_value
(
"stylesheet"
).
toString
());
}
Viewer
katarakt
(
file
);
if
(
!
katarakt
.
is_valid
())
{
return
1
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment