Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions data/darktableconfig.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,37 @@
<default>false</default>
<shortdescription>modify theme with user tweaks</shortdescription>
</dtconfig>
<dtconfig common="yes">
<name>themes/rounded-header</name>
<type>bool</type>
<default>false</default>
<shortdescription>use rounded module's header</shortdescription>
</dtconfig>
<dtconfig common="yes">
<name>themes/focused-module-border</name>
<type>bool</type>
<default>false</default>
<shortdescription>use small border around module</shortdescription>
</dtconfig>
<dtconfig common="yes">
<name>themes/expanded-module-border</name>
<type>bool</type>
<default>false</default>
<shortdescription>use small border around module</shortdescription>
</dtconfig>
<dtconfig common="yes">
<name>themes/colored-accent</name>
<type>int</type>
<default>0</default>
<shortdescription>use colored accent for some UI elements</shortdescription>
</dtconfig>
<dtconfig common="yes">
<name>themes/condensed</name>
<type>bool</type>
<default>false</default>
<shortdescription>condensed panels' controls</shortdescription>
<longdescription>use condensed panels' controls in all views</longdescription>
</dtconfig>
<dtconfig prefs="misc" section="accel">
<name>accel/prefer_focused</name>
<type>bool</type>
Expand Down Expand Up @@ -161,13 +192,6 @@
<shortdescription>marker shape</shortdescription>
<longdescription>the shape of the slider marker</longdescription>
</dtconfig>
<dtconfig prefs="misc" section="interface" common="yes" restart="true">
<name>themes/condensed</name>
<type>bool</type>
<default>false</default>
<shortdescription>condensed panels' controls</shortdescription>
<longdescription>use condensed panels' controls in all views</longdescription>
</dtconfig>
<dtconfig prefs="misc" section="interface" common="yes">
<name>darkroom/ui/auto_module_name_update</name>
<type>bool</type>
Expand Down
4 changes: 4 additions & 0 deletions data/themes/chunk-blue-accent-color.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color active_module_icon_fg @accent_blue;

@import url("chunk-colored-accent.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-blue-expanded-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_expanded_border_color @accent_blue;

@import url("chunk-expanded-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-blue-focused-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_focus_border_color @accent_blue;

@import url("chunk-focused-module-border.css");
19 changes: 19 additions & 0 deletions data/themes/chunk-colored-accent.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

#right #module-header > button:first-child:checked,
#right #basics-header-box > button:first-child:checked
{
color: @active_module_icon_fg;
}

#right #module-header > button:first-child:hover,
#right #basics-header-box > button:first-child:hover
{
background-color: black;
}

#right > box:last-child #module-header
{
background-color: @bg_color;
border-radius: 0px;
margin-right: 0.9em;
}
9 changes: 9 additions & 0 deletions data/themes/chunk-condensed.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@
min-height: 12px;
font-size: 0.95em;
}

#left #module-header,
#right #module-header,
#right #basics-header-box
{
border-radius: 0px;
margin: 0px;
padding: 4px;
}
4 changes: 4 additions & 0 deletions data/themes/chunk-dark-expanded-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_expanded_border_color shade(@plugin_bg_color, 0.5);

@import url("chunk-expanded-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-dark-focused-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_focus_border_color shade(@plugin_bg_color, 0.5);

@import url("chunk-focused-module-border.css");
13 changes: 13 additions & 0 deletions data/themes/chunk-expanded-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

/* ensure space for border is reserved for all modules */
#iop-expander
{
border: 0.1em solid @plugin_bg_color;
margin: 0.2em 0.2em 0 0.2em;
}

/* border for expanded modules */
#iop-expander.dt_module_expanded
{
border: 0.1em solid @plugin_expanded_border_color;
}
13 changes: 13 additions & 0 deletions data/themes/chunk-focused-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

/* ensure space for border is reserved for all modules */
#iop-expander
{
border: 0.1em solid @plugin_bg_color;
margin: 0.2em 0.2em 0 0.2em;
}

/* border for focused modules */
#iop-expander.dt_module_expanded.dt_module_focus
{
border: 0.1em solid @plugin_focus_border_color;
}
4 changes: 4 additions & 0 deletions data/themes/chunk-green-accent-color.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color active_module_icon_fg @accent_green;

@import url("chunk-colored-accent.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-green-expanded-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_expanded_border_color @accent_green;

@import url("chunk-expanded-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-green-focused-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_focus_border_color @accent_green;

@import url("chunk-focused-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-light-expanded-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_expanded_border_color shade(@plugin_bg_color, 2.0);

@import url("chunk-expanded-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-light-focused-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_focus_border_color shade(@plugin_bg_color, 2.0);

@import url("chunk-focused-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-orange-accent-color.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color active_module_icon_fg @accent_orange;

@import url("chunk-colored-accent.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-orange-expanded-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_expanded_border_color @accent_orange;

@import url("chunk-expanded-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-orange-focused-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_focus_border_color @accent_orange;

@import url("chunk-focused-module-border.css");
28 changes: 28 additions & 0 deletions data/themes/chunk-rounded-header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

@define-color header_color shade(@plugin_bg_color, 0.8);
@define-color header_color_bg shade(@plugin_bg_color, 1.1);

#left #module-header,
#right #module-header,
#right #basics-header-box
{
background-color: @header_color;
border-radius: 0px;
}

#left #module-header
{
border-top-right-radius: 15px;
}

#right #module-header,
#right #basics-header-box
{
border-top-left-radius: 15px;
}

#iop-expander,
.dt_module_expanded
{
background-color: @header_color_bg;
}
4 changes: 4 additions & 0 deletions data/themes/chunk-yellow-accent-color.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color active_module_icon_fg @accent_yellow;

@import url("chunk-colored-accent.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-yellow-expanded-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_expanded_border_color @accent_yellow;

@import url("chunk-expanded-module-border.css");
4 changes: 4 additions & 0 deletions data/themes/chunk-yellow-focused-module-border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

@define-color plugin_focus_border_color @accent_yellow;

@import url("chunk-focused-module-border.css");
13 changes: 13 additions & 0 deletions data/themes/darktable.css
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ Why that? Just because it's a developer choice and most classes use underscore i
@define-color colorlabel_yellow rgb(255,180,0);
@define-color colorlabel_purple rgb(230,0,230);

/* pastel colors for the variants (module borders and active module) */
@define-color accent_green #C1E1C5;
@define-color accent_blue #9FBFE2;
@define-color accent_yellow #E6E6A1;
@define-color accent_orange #E6C2A1;

/* Reset GTK defaults - Otherwise dt inherits Adwaita default theme dark */
*
{
Expand Down Expand Up @@ -1339,6 +1345,13 @@ filechooser row:hover .sidebar-icon
padding: 0.14em 0.84em;
}

#theme-variant
{
margin-left: 2em;
padding-left: 0.5em;
min-height: 1.5em;
}

/*--------------------
- Quick access tab -
--------------------*/
Expand Down
61 changes: 61 additions & 0 deletions src/gui/gtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3709,6 +3709,67 @@ void dt_gui_load_theme(const char *theme)
_add_theme_import(&themecss, datadir, "themes", "chunk-condensed.css");
}

// chunk-rounded-header

if(dt_conf_get_bool("themes/rounded-header"))
{
_add_theme_import(&themecss, datadir, "themes", "chunk-rounded-header.css");
}

// chunk-colored-accent

int index = dt_conf_get_int("themes/accent-color");

if(index > 0)
{
const char *colors[] =
{
"none",
"green",
"blue",
"yellow",
"orange"
};

char *chunk = g_strdup_printf
("chunk-%s-accent-color.css",
colors[index]);
_add_theme_import(&themecss, datadir, "themes", chunk);
g_free(chunk);
}

// focused module border

const char *border_colors[] =
{
"none",
"light",
"dark",
"green",
"blue",
"yellow",
"orange"};

index = dt_conf_get_int("themes/focused-module-border");

if (index > 0)
{
char *chunk = g_strdup_printf("chunk-%s-focused-module-border.css",
border_colors[index]);
_add_theme_import(&themecss, datadir, "themes", chunk);
g_free(chunk);
}

index = dt_conf_get_int("themes/expanded-module-border");

if (index > 0)
{
char *chunk = g_strdup_printf("chunk-%s-expanded-module-border.css",
border_colors[index]);
_add_theme_import(&themecss, datadir, "themes", chunk);
g_free(chunk);
}

// load any OS specific themes tweak file to fix some platform specific issues

#ifdef __APPLE__
Expand Down
Loading
Loading