Added buttons

master
Crom (Thibaut CHARLES) 8 years ago
parent 25b97424a5
commit 1035cd010a
  1. 19
      source/app.d

@ -15,11 +15,11 @@ import gtk.Entry;
import gtk.CellRenderer;
import gtk.CellRendererText;
import gtk.VBox;
import gtk.Statusbar;
import gtk.Button;
import gtk.HBox;
void main(string[] args)
{
@ -34,10 +34,10 @@ void main(string[] args)
auto buttonSave = new Button("document-save-symbolic", GtkIconSize.MENU);
auto buttonOpen = new Button("document-open-symbolic", GtkIconSize.MENU);
auto buttonInsert = new Button("format-text-direction-ltr-symbolic", GtkIconSize.SMALL_TOOLBAR);
auto buttonDelete = new Button("user-trash-symbolic", GtkIconSize.SMALL_TOOLBAR);
auto buttonRenumber = new Button("view-list-symbolic", GtkIconSize.SMALL_TOOLBAR);
//"user-trash-symbolic"
//"format-text-direction-ltr-symbolic"
//"view-list-symbolic"
version(Windows){
//Menu bar
import gtk.HBox;
@ -61,6 +61,13 @@ void main(string[] args)
header.packEnd(buttonSave);
}
//Status bar
auto statusbar = new HBox(false, 0);
cont.packEnd(statusbar, false, false, 5);
statusbar.packStart(buttonRenumber, false, false, 5);
statusbar.packStart(buttonInsert, false, false, 5);
statusbar.packStart(buttonDelete, false, false, 5);
//TreeView to display database
auto tree = new TreeView();
cont.packEnd(tree, true, true, 0);
@ -199,6 +206,8 @@ void Open(string file, ref TreeView tree, Object header){
//Autosize columns
tree.columnsAutosize();
tree.setSizeRequest(50, 50);
}

Loading…
Cancel
Save