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.
|
||||
*/
|
||||
|
||||
/* Declared for reference, they're actually unused */
|
||||
@define-color rt_salt_pinch #95B0DB;
|
||||
@define-color rt_base_color #dddddd;
|
||||
@define-color rt_fg_color #0A0A0A;
|
||||
@@ -36,6 +37,10 @@ GtkLabel, GtkComboBox, GtkEntry, GtkDrawingArea, GtkTreeView, GtkListTree {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
GtkButton, GtkCheckButton, GtkLabel {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
GtkFrame > GtkLabel {
|
||||
color: #EEEEEE;
|
||||
}
|
||||
@@ -80,21 +85,25 @@ GtkFrame {
|
||||
background-color: rgba(128,128,128,0.15);
|
||||
}
|
||||
|
||||
GtkNotebook tab GtkLabel,
|
||||
GtkNotebook tab GtkImage {
|
||||
margin: 2px;
|
||||
GtkNotebook {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
GtkNotebook tab GtkLabel {
|
||||
padding: 4px;
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
GtkNotebook {
|
||||
padding: 5px;
|
||||
GtkNotebook tab GtkButton {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
GtkNotebook tab GtkImage {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
GtkButton {
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-radius: 4px;
|
||||
@@ -144,13 +153,8 @@ GtkButton.Right {
|
||||
}
|
||||
|
||||
GtkEntry, GtkSpinButton {
|
||||
padding: 2px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
|
||||
GtkNotebook tab GtkButton, GtkNotebook tab GtkImage {
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
GtkMenu {
|
||||
|
@@ -17,7 +17,30 @@
|
||||
along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
* {
|
||||
padding: 1px;
|
||||
margin: 1px;
|
||||
ProgressBar {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
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()
|
||||
|
@@ -1953,7 +1953,9 @@ void Preferences::fontChanged ()
|
||||
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) {
|
||||
css = Gtk::CssProvider::create();
|
||||
@@ -1970,14 +1972,20 @@ void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface)
|
||||
options.slimUI = slimInterface;
|
||||
|
||||
if (slimInterface) {
|
||||
bool slimCreated = false;
|
||||
if (!cssSlim) {
|
||||
cssSlim = Gtk::CssProvider::create();
|
||||
slimCreated = true;
|
||||
}
|
||||
|
||||
filename = argv0 + "/themes/slim.css";
|
||||
|
||||
try {
|
||||
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) {
|
||||
printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str());
|
||||
} catch (...) {
|
||||
|
@@ -55,8 +55,8 @@ void ToolParamBlock::updateStyle()
|
||||
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
|
||||
} else {
|
||||
set_spacing(4); // 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_spacing(2); // Vertical space between parameters in a single tool
|
||||
set_border_width(7); // Space separating the parameters of a tool and its surrounding frame 8
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user