[geany/geany-plugins] bd2fd0: workbench: give sidebar a name to enable dedicated CSS styling
LarsGit223
git-noreply at xxxxx
Wed May 22 18:40:35 UTC 2019
Branch: refs/heads/master
Author: LarsGit223 <lars_paulsen at web.de>
Committer: LarsGit223 <lars_paulsen at web.de>
Date: Wed, 22 May 2019 18:40:35 UTC
Commit: bd2fd080acf681acae85d43a0f7711cffb9f6a2f
https://github.com/geany/geany-plugins/commit/bd2fd080acf681acae85d43a0f7711cffb9f6a2f
Log Message:
-----------
workbench: give sidebar a name to enable dedicated CSS styling
Give the sidebar a name/CSS ID to enable dedicated styling. Also
added a section with an example to the README.
Modified Paths:
--------------
workbench/README
workbench/src/sidebar.c
Modified: workbench/README
41 lines changed, 41 insertions(+), 0 deletions(-)
===================================================================
@@ -166,6 +166,47 @@ will output a message in the message window. The message has the following form:
Could not setup file monitoring for directory: "exampledir". Error: <some error message>
+Styling the sidebar
+-------------------
+
+On linux based systems using GTK3 the workbench sidebar can be styled using CSS.
+For general information on how to setup CSS with Geany please see the manual under
+https://www.geany.org/manual/current/index.html#customizing-geany-s-appearance-using-gtk-3-css.
+
+To style the workbench sidebar use the CSS ID *"workbench"*. Here is a small
+example::
+
+ /* Style the label over the treeview. */
+ #workbench label {
+ color: black;
+ background-color: silver;
+ border-bottom: 2px solid red;
+ font-size: 20pt;
+ }
+
+ /* Style the treeview: the border-color specifies the color of the
+ treeview lines (if enabled in the workbench settings). */
+ #workbench treeview {
+ color: black;
+ background-color: linen;
+ border-color: darkviolet;
+ font-size: 12pt;
+ }
+
+ /* The following changes the text and background color for the selected
+ row in the workbench treeview. */
+ #workbench treeview:selected {
+ color: white;
+ background-color: red;
+ }
+
+ /* The following changes the text and background color for a row in the
+ workbench treeview if the user hovers over it with the mouse pointer. */
+ #workbench treeview:hover {
+ color: white;
+ background-color: orange;
+ }
+
Known issues
============
Modified: workbench/src/sidebar.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -1374,6 +1374,7 @@ void sidebar_init(void)
GList *focus_chain = NULL;
sidebar.file_view_vbox = gtk_vbox_new(FALSE, 0);
+ gtk_widget_set_name(sidebar.file_view_vbox, "workbench");
/**** label ****/
sidebar.file_view_label = gtk_label_new (_("No workbench opened."));
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list