mirror of
https://gitlab.gnome.org/World/tootle
synced 2025-02-08 15:48:41 +01:00
Close #204
This commit is contained in:
parent
6cf3bbafd0
commit
4e7c6ad225
@ -5,13 +5,13 @@
|
||||
}
|
||||
|
||||
.attachment {
|
||||
border-radius: 6px;
|
||||
border-radius: 5px;
|
||||
background: rgba (150, 150, 150, 0.2);
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
.attachment .pic {
|
||||
border-radius: 6px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.attachment .chip {
|
||||
padding: 6px;
|
||||
@ -36,6 +36,7 @@
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.ttl-avatar-button {
|
||||
padding: 0;
|
||||
.ttl-flat-button {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
<class name="flat"/>
|
||||
<class name="image-button"/>
|
||||
<class name="circular"/>
|
||||
<class name="ttl-avatar-button"/>
|
||||
<class name="ttl-flat-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0 -->
|
||||
<!-- Generated with glade 3.22.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<template class="TootleWidgetsAttachmentSlot" parent="GtkFlowBoxChild">
|
||||
@ -8,9 +8,11 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="event_box">
|
||||
<object class="GtkButton" id="button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="on_clicked" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkGrid" id="overlay">
|
||||
<property name="visible">True</property>
|
||||
@ -22,6 +24,8 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_left">16</property>
|
||||
<property name="margin_right">16</property>
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
@ -46,6 +50,8 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
@ -74,7 +80,7 @@
|
||||
<property name="height_request">32</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="opacity">0.5019607843137255</property>
|
||||
<property name="opacity">0.50196078431372548</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
@ -91,11 +97,12 @@
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="flat"/>
|
||||
<class name="ttl-flat-button"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
|
@ -408,7 +408,7 @@
|
||||
<class name="flat"/>
|
||||
<class name="image-button"/>
|
||||
<class name="circular"/>
|
||||
<class name="ttl-avatar-button"/>
|
||||
<class name="ttl-flat-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -4,14 +4,10 @@ using Gdk;
|
||||
[GtkTemplate (ui = "/com/github/bleakgrey/tootle/ui/widgets/attachment_slot.ui")]
|
||||
public class Tootle.Widgets.Attachment.Slot : FlowBoxChild {
|
||||
|
||||
[GtkChild]
|
||||
EventBox event_box;
|
||||
[GtkChild]
|
||||
Label chip;
|
||||
[GtkChild]
|
||||
Image play_icon;
|
||||
[GtkChild]
|
||||
Stack stack;
|
||||
[GtkChild] Button button;
|
||||
[GtkChild] Label chip;
|
||||
[GtkChild] Image play_icon;
|
||||
[GtkChild] Stack stack;
|
||||
|
||||
public API.Attachment attachment { get; construct set; }
|
||||
|
||||
@ -42,8 +38,7 @@ public class Tootle.Widgets.Attachment.Slot : FlowBoxChild {
|
||||
}
|
||||
|
||||
construct {
|
||||
event_box.tooltip_text = attachment.description;
|
||||
event_box.button_release_event.connect (on_clicked);
|
||||
button.tooltip_text = attachment.description;
|
||||
}
|
||||
|
||||
void download () {
|
||||
@ -60,12 +55,9 @@ public class Tootle.Widgets.Attachment.Slot : FlowBoxChild {
|
||||
() => {});
|
||||
}
|
||||
|
||||
protected virtual bool on_clicked (EventButton ev) {
|
||||
if (ev.button != 1)
|
||||
return false;
|
||||
|
||||
[GtkCallback]
|
||||
protected virtual void on_clicked () {
|
||||
open ();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public class Tootle.Widgets.Conversation : Widgets.Status {
|
||||
if (conversation.accounts.last () != account)
|
||||
label += ", ";
|
||||
}
|
||||
return @"$label";
|
||||
return label;
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ public class Tootle.Widgets.Conversation : Widgets.Status {
|
||||
foreach (API.Account account in conversation.accounts) {
|
||||
label += account.handle + " ";
|
||||
}
|
||||
return @"<small>$label</small>";
|
||||
return label;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user