[feature/handy]: Adapt OMEMO dialog (#985)
* Wrap OMEMO automatically accept label * Change OMEMO fingerprint label to wrap with max-width * Set contact OMEMO dialog as resizable * Disable expanding grid in contact details
This commit is contained in:
parent
114b7114d9
commit
db1bff1c87
|
@ -36,6 +36,7 @@
|
|||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="DinoUiAvatarImage" id="avatar">
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<interface>
|
||||
<template class="DinoPluginsOmemoContactDetailsDialog">
|
||||
<property name="modal">True</property>
|
||||
<property name="resizable">False</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
|
@ -37,6 +36,8 @@
|
|||
<object class="GtkLabel" id="automatically_accept_new_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="wrap">True</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="1.1"/>
|
||||
</attributes>
|
||||
|
@ -114,8 +115,10 @@
|
|||
<object class="GtkLabel" id="own_fingerprint_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="justify">right</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="max_width_chars">35</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
|
|
@ -288,7 +288,7 @@ public class ContactDetailsDialog : Gtk.Dialog {
|
|||
public class FingerprintRow : ListBoxRow {
|
||||
|
||||
private Image trust_image = new Image() { visible = true, halign = Align.END, icon_size = IconSize.BUTTON };
|
||||
private Label fingerprint_label = new Label("") { use_markup=true, justify=Justification.RIGHT, visible=true, halign = Align.START, valign = Align.CENTER, hexpand = false };
|
||||
private Label fingerprint_label = new Label("") { use_markup=true, max_width_chars=35, wrap=true, visible=true, halign = Align.START, valign = Align.CENTER, hexpand = false, xalign = 0 };
|
||||
private Label trust_label = new Label(null) { visible = true, hexpand = true, xalign = 0 };
|
||||
|
||||
public Row row;
|
||||
|
|
|
@ -51,9 +51,8 @@ public static string fingerprint_markup(string s) {
|
|||
b = (uint8) (b * factor);
|
||||
}
|
||||
|
||||
if (i % 32 == 0 && i != 0) markup += "\n";
|
||||
markup += @"<span foreground=\"$("#%02x%02x%02x".printf(r, g, b))\">$four_chars</span>";
|
||||
if (i % 8 == 4 && i % 32 != 28) markup += " ";
|
||||
if (i % 8 == 4) markup += " ";
|
||||
}
|
||||
|
||||
return "<span font_family='monospace' font='8'>" + markup + "</span>";
|
||||
|
|
Loading…
Reference in a new issue