Handling the Slim mode
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
Please keep this gtkrc in sync with the other ones from Clearlooks based themes.
|
Please keep this gtkrc in sync with the other ones from Clearlooks based themes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Declared for reference, they're actually unused */
|
||||||
@define-color rt_salt_pinch #95B0DB;
|
@define-color rt_salt_pinch #95B0DB;
|
||||||
@define-color rt_base_color #dddddd;
|
@define-color rt_base_color #dddddd;
|
||||||
@define-color rt_fg_color #0A0A0A;
|
@define-color rt_fg_color #0A0A0A;
|
||||||
@@ -36,6 +37,10 @@ GtkLabel, GtkComboBox, GtkEntry, GtkDrawingArea, GtkTreeView, GtkListTree {
|
|||||||
color: #AAAAAA;
|
color: #AAAAAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GtkButton, GtkCheckButton, GtkLabel {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
GtkFrame > GtkLabel {
|
GtkFrame > GtkLabel {
|
||||||
color: #EEEEEE;
|
color: #EEEEEE;
|
||||||
}
|
}
|
||||||
@@ -80,21 +85,25 @@ GtkFrame {
|
|||||||
background-color: rgba(128,128,128,0.15);
|
background-color: rgba(128,128,128,0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkNotebook tab GtkLabel,
|
GtkNotebook {
|
||||||
GtkNotebook tab GtkImage {
|
padding: 4px;
|
||||||
margin: 2px;
|
}
|
||||||
|
|
||||||
|
GtkNotebook tab GtkLabel {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
font-size: 120%;
|
font-size: 120%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkNotebook {
|
GtkNotebook tab GtkButton {
|
||||||
padding: 5px;
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkNotebook tab GtkImage {
|
||||||
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkButton {
|
GtkButton {
|
||||||
margin: 2px;
|
|
||||||
padding: 2px;
|
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@@ -144,13 +153,8 @@ GtkButton.Right {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GtkEntry, GtkSpinButton {
|
GtkEntry, GtkSpinButton {
|
||||||
padding: 2px;
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GtkNotebook tab GtkButton, GtkNotebook tab GtkImage {
|
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
margin: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkMenu {
|
GtkMenu {
|
||||||
|
@@ -17,7 +17,30 @@
|
|||||||
along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
* {
|
ProgressBar {
|
||||||
padding: 1px;
|
padding: 2px;
|
||||||
margin: 1px;
|
}
|
||||||
|
|
||||||
|
GtkNotebook {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkNotebook tab GtkLabel {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkNotebook tab GtkButton {
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkNotebook tab GtkImage {
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkImage {
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BIG {
|
||||||
|
padding: 4pt;
|
||||||
}
|
}
|
||||||
|
@@ -533,7 +533,7 @@ void ExpanderBox::setLevel(int level)
|
|||||||
|
|
||||||
void ExpanderBox::updateStyle()
|
void ExpanderBox::updateStyle()
|
||||||
{
|
{
|
||||||
set_border_width(options.slimUI ? 2 : 8); // Outer space around the tool's frame 2:7
|
set_border_width(options.slimUI ? 2 : 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExpanderBox::show_all()
|
void ExpanderBox::show_all()
|
||||||
|
@@ -1953,7 +1953,9 @@ void Preferences::fontChanged ()
|
|||||||
void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface)
|
void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface)
|
||||||
{
|
{
|
||||||
|
|
||||||
Glib::ustring filename(argv0 + "/themes/" + options.theme + ".css");
|
//Glib::ustring filename(argv0 + "/themes/" + options.theme + ".css");
|
||||||
|
// Forcing the default dark theme
|
||||||
|
Glib::ustring filename(argv0 + "/themes/rtcommon.css");
|
||||||
|
|
||||||
if (!css) {
|
if (!css) {
|
||||||
css = Gtk::CssProvider::create();
|
css = Gtk::CssProvider::create();
|
||||||
@@ -1970,14 +1972,20 @@ void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface)
|
|||||||
options.slimUI = slimInterface;
|
options.slimUI = slimInterface;
|
||||||
|
|
||||||
if (slimInterface) {
|
if (slimInterface) {
|
||||||
|
bool slimCreated = false;
|
||||||
if (!cssSlim) {
|
if (!cssSlim) {
|
||||||
cssSlim = Gtk::CssProvider::create();
|
cssSlim = Gtk::CssProvider::create();
|
||||||
|
slimCreated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = argv0 + "/themes/slim.css";
|
filename = argv0 + "/themes/slim.css";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
cssSlim->load_from_path (filename);
|
cssSlim->load_from_path (filename);
|
||||||
|
if (slimCreated) {
|
||||||
|
Glib::RefPtr<Gdk::Screen> screen = Gdk::Screen::get_default();
|
||||||
|
Gtk::StyleContext::add_provider_for_screen(screen, cssSlim, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||||
|
}
|
||||||
} catch (Glib::Error &err) {
|
} catch (Glib::Error &err) {
|
||||||
printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str());
|
printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
@@ -55,8 +55,8 @@ void ToolParamBlock::updateStyle()
|
|||||||
set_spacing(2); // Vertical space between parameters in a single tool
|
set_spacing(2); // Vertical space between parameters in a single tool
|
||||||
set_border_width(6); // Space separating the parameters of a tool and its surrounding frame 6
|
set_border_width(6); // Space separating the parameters of a tool and its surrounding frame 6
|
||||||
} else {
|
} else {
|
||||||
set_spacing(4); // Vertical space between parameters in a single tool
|
set_spacing(2); // Vertical space between parameters in a single tool
|
||||||
set_border_width(8); // Space separating the parameters of a tool and its surrounding frame 8
|
set_border_width(7); // Space separating the parameters of a tool and its surrounding frame 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user