modified style handling for GTK 3.16

experimental
Wolf Vollprecht 2015-05-19 22:32:55 +02:00
parent a16f5d95d2
commit 86cd732902
9 changed files with 82 additions and 27 deletions

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

27
.idea/misc.xml 100644
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</component>
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectModuleManager">
<modules />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.1 (/usr/bin/python3.4)" project-jdk-type="Python SDK" />
<component name="RunManager">
<list size="0" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/uberwriter.iml" filepath="$PROJECT_DIR$/.idea/uberwriter.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml 100644
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -35,29 +35,24 @@
bind "<ctl><shift>z" { "redo" () };
}
#UberwriterWindow {
.uberwriter_window {
gtk-key-bindings: window-bindings;
/*border-radius: 7px 7px 3px 3px;*/
background: @light_editor_bg;
background-color: @light_editor_bg;
}
#UberwriterWindow.small #UberwriterEditor {
#UberwriterWindow.small .uberwriter-editor {
font: Inconsolata 12;
}
#UberwriterWindow.medium #UberwriterEditor {
#UberwriterWindow.medium .uberwriter-editor {
font: Inconsolata 15;
}
#UberwriterWindow.large #UberwriterEditor {
#UberwriterWindow.large .uberwriter-editor {
font: Inconsolata 17;
}
#UberwriterWindow.large #UberwriterEditor *{
font: initial;
}
#UberwriterWindow GtkAlignment {
margin-top: 30px;
margin-bottom: 60px;
@ -67,7 +62,7 @@
background: #333;
}
#UberwriterWindow.dark_mode #UberwriterEditor {
#UberwriterWindow.dark_mode .uberwriter-editor {
color: #CCC;
background: @dark_bg;
@ -79,7 +74,7 @@
background-color: transparent;
}
#UberwriterEditor {
.uberwriter-editor {
border: none;
background: @light_editor_bg;
/*background: und-color: transparent;*/
@ -89,29 +84,29 @@
gtk-key-bindings: editor-bindings;
}
#UberwriterEditor:selected {
.uberwriter-editor:selected {
background-color: #4D9FCE;
color: #FFF;
}
#UberwriterEditor GtkButton {
.uberwriter-editor GtkButton {
margin: 0;
padding: 0;
/*background: #CCC;*/
}
#UberwriterWindow GtkToolbar {
.uberwriter-editor GtkToolbar {
/*background: transparent;*/
border: none;
padding: 0;
}
#status_bar_box GtkLabel {
.status_bar_box GtkLabel {
color: #666;
}
#status_bar_box GtkButton {
.status_bar_box GtkButton {
/* finding reset */
background-color: initial;
text-shadow: inherit;
@ -143,28 +138,28 @@
transition: 500ms ease-in;
}
#status_bar_box GtkButton:hover,
#status_bar_box GtkButton:active:hover {
.status_bar_box GtkButton:hover,
.status_bar_box GtkButton:active:hover {
transition: 0s ease-in;
color: #333;
background: #EEE;
}
#status_bar_box GtkButton:active {
.status_bar_box GtkButton:active {
color: #EEE;
background-color: #EEE;
background-image: none;
box-shadow: 0 0 2px rgba(0,0,0,0.4)
}
.dark_mode #status_bar_box GtkButton {
.dark_mode .status_bar_box GtkButton {
}
.dark_mode #status_bar_box GtkButton:hover,
.dark_mode #status_bar_box GtkButton:active {
.dark_mode .status_bar_box GtkButton:hover,
.dark_mode .status_bar_box GtkButton:active {
background-color: shade(@dark_bg, 0.8);
}
#status_bar_box GtkSeparator {
.status_bar_box GtkSeparator {
border-color: #999;
border-right: none;
}
@ -235,4 +230,4 @@
#UberwriterWindow #AutoCorrect GtkImage {
padding: 3px 5px;
}
}

View File

@ -142,6 +142,7 @@ class TextEditor(Gtk.TextView):
self.connect('redo', self.redo)
self.connect('undo', self.undo)
self.get_style_context().add_class("uberwriter-editor")
@property
def text(self):

View File

@ -982,7 +982,7 @@ class UberwriterWindow(Window):
self.status_bar = builder.get_object('status_bar_box')
self.statusbar_revealer = builder.get_object('status_bar_revealer')
self.status_bar.set_name('status_bar_box')
self.status_bar.get_style_context().add_class('status_bar_box')
self.status_bar_visible = True
self.was_motion = True
self.buffer_modified_for_status_bar = False
@ -995,6 +995,7 @@ class UberwriterWindow(Window):
# Setup light background
self.TextEditor = TextEditor()
self.TextEditor.set_name('UberwriterEditor')
self.get_style_context().add_class('uberwriter_window')
base_leftmargin = 40
# self.TextEditor.set_left_margin(base_leftmargin)
@ -1217,4 +1218,4 @@ class UberwriterWindow(Window):
except Exception as e:
logger.debug("(First Run?) Error loading settings from home dir. \
Error: %r", e)
return True
return True