Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Add purple accent color
Browse files Browse the repository at this point in the history
  • Loading branch information
bleakgrey committed Apr 8, 2018
1 parent 9e60246 commit 9fc9802
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
Binary file modified data/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/screenshot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 19 additions & 4 deletions src/TransporterWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 ();
Expand All @@ -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));
});

Expand All @@ -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;
Expand Down
15 changes: 1 addition & 14 deletions src/View/DropView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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}
};
Expand All @@ -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);
Expand Down Expand Up @@ -104,4 +91,4 @@ public class DropView : AbstractView {
}
}

}
}

0 comments on commit 9fc9802

Please sign in to comment.