Fix header bar button spacing
This commit is contained in:
parent
7564a16a0b
commit
577f0c1b68
|
@ -18,12 +18,16 @@
|
||||||
border-radius:6px;
|
border-radius:6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-title-button {
|
.ttl-header-button {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
.ttl-header-button .title, .ttl-header-button .subtitle {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.padded.ttl-view {
|
.padded.ttl-view {
|
||||||
margin: 32px 0 32px 0;
|
margin: 32px 0 32px 0;
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
</child>
|
</child>
|
||||||
<style>
|
<style>
|
||||||
<class name="flat"/>
|
<class name="flat"/>
|
||||||
<class name="header-title-button"/>
|
<class name="ttl-header-button"/>
|
||||||
</style>
|
</style>
|
||||||
</template>
|
</template>
|
||||||
</interface>
|
</interface>
|
||||||
|
|
|
@ -93,18 +93,10 @@ public class Tootle.Entity : GLib.Object, Widgetizable, Json.Serializable {
|
||||||
}
|
}
|
||||||
return des_list (out val, node, contains);
|
return des_list (out val, node, contains);
|
||||||
}
|
}
|
||||||
else if (type.is_a (typeof (API.NotificationType)))
|
|
||||||
return des_notification_type (out val, node);
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool des_notification_type (out Value val, Json.Node node) {
|
|
||||||
var str = node.get_string ();
|
|
||||||
val = API.NotificationType.from_string (str);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool des_list (out Value val, Json.Node node, Type type) {
|
static bool des_list (out Value val, Json.Node node, Type type) {
|
||||||
if (!node.is_null ()) {
|
if (!node.is_null ()) {
|
||||||
var arr = new Gee.ArrayList<Entity> ();
|
var arr = new Gee.ArrayList<Entity> ();
|
||||||
|
@ -123,19 +115,10 @@ public class Tootle.Entity : GLib.Object, Widgetizable, Json.Serializable {
|
||||||
|
|
||||||
if (type.is_a (typeof (Gee.ArrayList)))
|
if (type.is_a (typeof (Gee.ArrayList)))
|
||||||
return ser_list (prop, val, spec);
|
return ser_list (prop, val, spec);
|
||||||
if (type.is_a (typeof (API.NotificationType)))
|
|
||||||
return ser_notification_type (prop, val, spec);
|
|
||||||
|
|
||||||
return default_serialize_property (prop, val, spec);
|
return default_serialize_property (prop, val, spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Json.Node ser_notification_type (string prop, Value val, ParamSpec spec) {
|
|
||||||
var enum_val = (API.NotificationType) val;
|
|
||||||
var node = new Json.Node (NodeType.VALUE);
|
|
||||||
node.set_string (enum_val.to_string ());
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Json.Node ser_list (string prop, Value val, ParamSpec spec) {
|
static Json.Node ser_list (string prop, Value val, ParamSpec spec) {
|
||||||
var list = (Gee.ArrayList<Entity>) val;
|
var list = (Gee.ArrayList<Entity>) val;
|
||||||
if (list == null)
|
if (list == null)
|
||||||
|
|
|
@ -2,7 +2,7 @@ public enum Tootle.API.NotificationType {
|
||||||
MENTION,
|
MENTION,
|
||||||
REBLOG,
|
REBLOG,
|
||||||
REBLOG_REMOTE_USER, // Internal
|
REBLOG_REMOTE_USER, // Internal
|
||||||
FAVORITE,
|
FAVOURITE,
|
||||||
FOLLOW,
|
FOLLOW,
|
||||||
FOLLOW_REQUEST, // Internal
|
FOLLOW_REQUEST, // Internal
|
||||||
WATCHLIST; // Internal
|
WATCHLIST; // Internal
|
||||||
|
@ -15,7 +15,7 @@ public enum Tootle.API.NotificationType {
|
||||||
return "reblog";
|
return "reblog";
|
||||||
case REBLOG_REMOTE_USER:
|
case REBLOG_REMOTE_USER:
|
||||||
return "reblog_remote";
|
return "reblog_remote";
|
||||||
case FAVORITE:
|
case FAVOURITE:
|
||||||
return "favourite";
|
return "favourite";
|
||||||
case FOLLOW:
|
case FOLLOW:
|
||||||
return "follow";
|
return "follow";
|
||||||
|
@ -38,7 +38,7 @@ public enum Tootle.API.NotificationType {
|
||||||
case "reblog_remote":
|
case "reblog_remote":
|
||||||
return REBLOG_REMOTE_USER;
|
return REBLOG_REMOTE_USER;
|
||||||
case "favourite":
|
case "favourite":
|
||||||
return FAVORITE;
|
return FAVOURITE;
|
||||||
case "follow":
|
case "follow":
|
||||||
return FOLLOW;
|
return FOLLOW;
|
||||||
case "follow_request":
|
case "follow_request":
|
||||||
|
@ -58,7 +58,7 @@ public enum Tootle.API.NotificationType {
|
||||||
return _("<span underline=\"none\"><a href=\"%s\">%s</a> boosted your status</span>").printf (account.url, account.display_name);
|
return _("<span underline=\"none\"><a href=\"%s\">%s</a> boosted your status</span>").printf (account.url, account.display_name);
|
||||||
case REBLOG_REMOTE_USER:
|
case REBLOG_REMOTE_USER:
|
||||||
return _("<span underline=\"none\"><a href=\"%s\">%s</a> boosted</span>").printf (account.url, account.display_name);
|
return _("<span underline=\"none\"><a href=\"%s\">%s</a> boosted</span>").printf (account.url, account.display_name);
|
||||||
case FAVORITE:
|
case FAVOURITE:
|
||||||
return _("<span underline=\"none\"><a href=\"%s\">%s</a> favorited your status</span>").printf (account.url, account.display_name);
|
return _("<span underline=\"none\"><a href=\"%s\">%s</a> favorited your status</span>").printf (account.url, account.display_name);
|
||||||
case FOLLOW:
|
case FOLLOW:
|
||||||
return _("<span underline=\"none\"><a href=\"%s\">%s</a> now follows you</span>").printf (account.url, account.display_name);
|
return _("<span underline=\"none\"><a href=\"%s\">%s</a> now follows you</span>").printf (account.url, account.display_name);
|
||||||
|
@ -80,7 +80,7 @@ public enum Tootle.API.NotificationType {
|
||||||
case REBLOG:
|
case REBLOG:
|
||||||
case REBLOG_REMOTE_USER:
|
case REBLOG_REMOTE_USER:
|
||||||
return "media-playlist-repeat-symbolic";
|
return "media-playlist-repeat-symbolic";
|
||||||
case FAVORITE:
|
case FAVOURITE:
|
||||||
return "starred-symbolic";
|
return "starred-symbolic";
|
||||||
case FOLLOW:
|
case FOLLOW:
|
||||||
case FOLLOW_REQUEST:
|
case FOLLOW_REQUEST:
|
||||||
|
|
Loading…
Reference in New Issue