Added logo and title to connection assistant

This commit is contained in:
Tristan B. Kildaire 2020-10-25 11:26:08 +02:00
parent 87db85f7aa
commit b090584fbd
1 changed files with 16 additions and 3 deletions

View File

@ -11,6 +11,7 @@ import gtk.Assistant;
import gtk.Label; import gtk.Label;
import gtk.Box; import gtk.Box;
import gtk.Entry; import gtk.Entry;
import gtk.Image;
import gui; import gui;
import std.conv; import std.conv;
import std.string : cmp, strip; import std.string : cmp, strip;
@ -40,10 +41,22 @@ public final class ConnectionAssistant : Assistant
{ {
Assistant connectionAssistant = new Assistant(); Assistant connectionAssistant = new Assistant();
/* Welcome page */
Box welcomeBox = new Box(GtkOrientation.VERTICAL, 1);
Image logo = new Image("user-available", GtkIconSize.DIALOG);
logo.setPixelSize(250);
welcomeBox.add(logo);
Label title = new Label("<span size=\"100\">Gustav</span>");
title.setMarkup("<span font_desc=\"Open Sans Extrabold\" size=\"50000\">Gustav</span>");
welcomeBox.add(title);
Label hello = new Label(""); Label hello = new Label("");
hello.setMarkup("<span size=\"15000\">Welcome to the connection setup</span>"); hello.setMarkup("<span size=\"15000\">Welcome to the connection setup</span>");
connectionAssistant.insertPage(hello, 0); welcomeBox.add(hello);
connectionAssistant.setPageTitle(hello, "Welcome");
connectionAssistant.insertPage(welcomeBox, 0);
connectionAssistant.setPageTitle(welcomeBox, "Welcome");
/* Configure a server */ /* Configure a server */
Box serverBox = new Box(GtkOrientation.VERTICAL, 1); Box serverBox = new Box(GtkOrientation.VERTICAL, 1);
@ -77,7 +90,7 @@ public final class ConnectionAssistant : Assistant
connectionAssistant.setPageTitle(profileBox, "Account"); connectionAssistant.setPageTitle(profileBox, "Account");
/* TODO: We should actually verify inputs before doing this */ /* TODO: We should actually verify inputs before doing this */
connectionAssistant.setPageComplete(hello, true); connectionAssistant.setPageComplete(welcomeBox, true);
connectionAssistant.setPageComplete(serverBox, true); connectionAssistant.setPageComplete(serverBox, true);
connectionAssistant.setPageComplete(profileBox, true); connectionAssistant.setPageComplete(profileBox, true);