Skip to content

Commit

Permalink
hold off on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
donpdonp committed Aug 14, 2019
1 parent 45ea48a commit 65fecaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 4 additions & 9 deletions src/gui/gtk.zig
Original file line number Diff line number Diff line change
Expand Up @@ -396,20 +396,15 @@ pub fn makeTootBox(toot: toot_lib.Toot(), colconfig: *config.ColumnConfig) [*c]c


const tagBox = builder_get_widget(builder, c"tag_box");
var tagidx = usize(0);
for(toot.tagList.toSlice()) |tag| {
const cTag = util.sliceToCstr(allocator, tag);
const tagLabel = c.gtk_label_new(cTag);
const labelContext = c.gtk_widget_get_style_context(tagLabel);
c.gtk_style_context_add_class(labelContext, c"toot_tag");
c.gtk_box_pack_start(@ptrCast([*c]c.GtkBox, tagBox), tagLabel,
c.gtk_false(), c.gtk_true(), 10);
c.gtk_widget_show(tagLabel);

var tagboxAllocation = c.GtkAllocation{.x=-1, .y=-1, .width=0, .height=0};
c.gtk_widget_get_allocation(tagBox, &tagboxAllocation);
var taglabelAllocation = c.GtkAllocation{.x=-1, .y=-1, .width=0, .height=0};
c.gtk_widget_get_allocation(tagLabel, &taglabelAllocation);
warn("tagbox width {} label width {}\n", tagboxAllocation.width, taglabelAllocation.width);
// c.gtk_box_pack_start(@ptrCast([*c]c.GtkBox, tagBox), tagLabel,
// c.gtk_false(), c.gtk_true(), 10);
// c.gtk_widget_show(tagLabel);
}

if(colconfig.img_only) {
Expand Down
6 changes: 4 additions & 2 deletions theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
color: #777;
}
.toot_tag {
color: #2FF;
background: #333;
color: #333;
background: #F75;
padding: 0px 5px;
border-radius: 15px;
}

.net_error {
Expand Down

0 comments on commit 65fecaa

Please sign in to comment.