Fixed some minor UI issues
authorDan Breslau <dbreslau@painless-security.com>
Wed, 10 Aug 2016 19:03:53 +0000 (15:03 -0400)
committerDan Breslau <dbreslau@painless-security.com>
Wed, 10 Aug 2016 19:03:53 +0000 (15:03 -0400)
src/moonshot-identity-dialog.vala
src/moonshot-trust-anchor-dialog.vala

index d6ecf24..99a52b4 100644 (file)
@@ -287,7 +287,7 @@ class IdentityDialog : Dialog
     {
         logger.trace("make_services_vbox");
 
-        var services_vbox_alignment = new Alignment(0, 0, 1, 1);
+        var services_vbox_alignment = new Alignment(0, 0, 1, 0);
         var services_vscroll = new ScrolledWindow(null, null);
         services_vscroll.set_policy(PolicyType.NEVER, PolicyType.AUTOMATIC);
         services_vscroll.set_shadow_type(ShadowType.IN);
@@ -335,6 +335,7 @@ class IdentityDialog : Dialog
         {
             var label = new Label(service);
             label.set_alignment((float) 0, (float) 0);
+            label.xpad = 3;
 
             EventBox event_box = new EventBox();
             event_box.modify_bg(StateType.NORMAL, white);
@@ -368,8 +369,7 @@ class IdentityDialog : Dialog
                     return false;
                 });
 
-            AttachOptions opts = AttachOptions.EXPAND | AttachOptions.FILL;
-            services_table.attach(event_box, 0, 1, i, i+1, opts, opts, 3, 0);
+            services_table.attach_defaults(event_box, 0, 1, i, i+1);
             i++;
         }
 
index 9fc2213..b3de3df 100644 (file)
@@ -46,7 +46,7 @@ class TrustAnchorDialog : Dialog
         this.set_transient_for(parent);
         this.modify_bg(StateType.NORMAL, white);
 
-        this.add_buttons(_("Connect"), ResponseType.OK,
+        this.add_buttons(_("Confirm"), ResponseType.OK,
                          _("Cancel"), ResponseType.CANCEL);
 
         this.set_default_response(ResponseType.OK);
@@ -73,22 +73,19 @@ class TrustAnchorDialog : Dialog
         var fingerprint_label = new Label(_("SHA-256 fingerprint:"));
         fingerprint_label.set_alignment(0, 0.5f);
 
-        var footprint = new TextView();
-        //footprint.activates_default = false;
-        // footprint.set_sensitive(false);
-        footprint.set_editable(false);
-        // footprint.set_text(idcard.trust_anchor.server_cert);
-        var buffer = footprint.get_buffer();
+        var fingerprint = new TextView();
+        fingerprint.set_editable(false);
+        var buffer = fingerprint.get_buffer();
         buffer.set_text(colonize(idcard.trust_anchor.server_cert), -1);
-        footprint.wrap_mode = WrapMode.WORD_CHAR;
+        fingerprint.wrap_mode = WrapMode.WORD_CHAR;
 
-        set_atk_relation(fingerprint_label, footprint, Atk.RelationType.LABEL_FOR);
+        set_atk_relation(fingerprint_label, fingerprint, Atk.RelationType.LABEL_FOR);
 
-        var footprint_width_constraint = new ScrolledWindow(null, null);
-        footprint_width_constraint.set_policy(PolicyType.NEVER, PolicyType.NEVER);
-        footprint_width_constraint.set_shadow_type(ShadowType.IN);
-        footprint_width_constraint.set_size_request(400, 60);
-        footprint_width_constraint.add_with_viewport(footprint);
+        var fingerprint_width_constraint = new ScrolledWindow(null, null);
+        fingerprint_width_constraint.set_policy(PolicyType.NEVER, PolicyType.NEVER);
+        fingerprint_width_constraint.set_shadow_type(ShadowType.IN);
+        fingerprint_width_constraint.set_size_request(400, 60);
+        fingerprint_width_constraint.add_with_viewport(fingerprint);
 
         Label confirm_label = new Label(_("Please confirm that this is the correct trust anchor."));
         confirm_label.set_alignment(0, 0.5f);
@@ -99,7 +96,7 @@ class TrustAnchorDialog : Dialog
         vbox.pack_start(user_label, true, true, 2);
         vbox.pack_start(realm_label, true, true, 2);
         vbox.pack_start(fingerprint_label, true, true, 2);
-        vbox.pack_start(footprint_width_constraint, true, true, 2);
+        vbox.pack_start(fingerprint_width_constraint, true, true, 2);
         vbox.pack_start(confirm_label, true, true, 12);
 
         ((Container) content_area).add(vbox);