Skip to content

Commit

Permalink
Add padding to list columns
Browse files Browse the repository at this point in the history
  • Loading branch information
p-e-w committed Jan 29, 2017
1 parent 4ee3082 commit 975c69d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/CommandList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Plotinus.CommandList : Gtk.TreeView {
}
}

private static const string COLUMN_PADDING = " ";

private string filter = "";
private string[] filter_words = {};

Expand Down Expand Up @@ -67,15 +69,19 @@ class Plotinus.CommandList : Gtk.TreeView {

text_color.alpha = 0.4;
append_column(new ListColumn((command) => {
return highlight_words(string.joinv(" \u25B6 ", command.path), filter_words) + " ";
return COLUMN_PADDING +
highlight_words(string.joinv(" \u25B6 ", command.path), filter_words) +
COLUMN_PADDING;
}, true, text_color));

append_column(new ListColumn((command) => {
return highlight_words(command.label, filter_words);
}, false, null, 1.4));

append_column(new ListColumn((command) => {
return Markup.escape_text(string.joinv(", ", map_string(command.accelerators, format_accelerator)));
return COLUMN_PADDING +
Markup.escape_text(string.joinv(", ", map_string(command.accelerators, format_accelerator))) +
COLUMN_PADDING;
}, true, selection_color));
});
}
Expand Down

0 comments on commit 975c69d

Please sign in to comment.