diff --git a/data/screenshot.png b/data/screenshot.png index eecf872..06e2a03 100644 Binary files a/data/screenshot.png and b/data/screenshot.png differ diff --git a/data/screenshot2.png b/data/screenshot2.png index 0000a6a..3dee927 100644 Binary files a/data/screenshot2.png and b/data/screenshot2.png differ diff --git a/data/screenshot3.png b/data/screenshot3.png index b2beda8..90ac609 100644 Binary files a/data/screenshot3.png and b/data/screenshot3.png differ diff --git a/src/TransporterWindow.vala b/src/TransporterWindow.vala index ad2ce10..fbd1fc2 100644 --- a/src/TransporterWindow.vala +++ b/src/TransporterWindow.vala @@ -11,6 +11,15 @@ public class TransporterWindow: Gtk.Dialog { public WormholeInterface wormhole; + private const string STYLE = """ + @define-color colorAccent #7a36b1; + .drop{ + border: 2px dashed rgba(0,0,0,.25); + border-radius: 5px; + padding: 32px; + } + """; + public TransporterWindow (Gtk.Application application) { Object (application: application, icon_name: "com.github.bleakgrey.transporter", @@ -41,6 +50,12 @@ public class TransporterWindow: Gtk.Dialog { get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT); get_content_area ().set_size_request (400, 400); + Granite.Widgets.Utils.set_theming_for_screen ( + get_screen(), + STYLE, + Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + ); + stack = new Stack(); stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT_RIGHT; stack.show (); @@ -60,7 +75,7 @@ public class TransporterWindow: Gtk.Dialog { settings_button.tooltip_text = _("Settings"); settings_button.image = new Gtk.Image.from_icon_name ("open-menu-symbolic", Gtk.IconSize.SMALL_TOOLBAR); settings_button.clicked.connect (() => { - if (settings_button.sensitive) + if (settings_button.sensitive) append (new SettingsView (this)); }); @@ -78,14 +93,14 @@ public class TransporterWindow: Gtk.Dialog { private void update_header(){ var back_visible = !(current_screen is WelcomeView) && stack.get_children ().length() > 1; update_header_widget (back_button, back_visible); - + var settings_visible = !(current_screen is SettingsView); update_header_widget (settings_button, settings_visible); - + settings_button.visible = !(current_screen is SettingsView || current_screen is InstallView || wormhole.is_running ()); spinner.visible = (current_screen is InstallView || wormhole.is_running ()); } - + private void update_header_widget(Widget widget, bool visible){ if (visible) { widget.opacity = 1; diff --git a/src/View/DropView.vala b/src/View/DropView.vala index 88977d8..1f0849c 100644 --- a/src/View/DropView.vala +++ b/src/View/DropView.vala @@ -3,13 +3,6 @@ using Gdk; public class DropView : AbstractView { - private const string STYLE = """ - .drop{ - border: 2px dashed rgba(0,0,0,.25); - border-radius: 5px; - padding: 32px; - } - """; private const Gtk.TargetEntry[] targets = { {"text/uri-list",0,0} }; @@ -19,12 +12,6 @@ public class DropView : AbstractView { private Gtk.Label title; construct { - Granite.Widgets.Utils.set_theming_for_screen ( - get_screen(), - STYLE, - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION - ); - border_width = 10; var drop = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); @@ -104,4 +91,4 @@ public class DropView : AbstractView { } } -} \ No newline at end of file +}