Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions res/gtk/icons/category-search-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
171 changes: 125 additions & 46 deletions res/gtk/query-view.blp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ template $PsequelQueryView : Adw.Bin {

Box {
orientation: vertical;
width-request: 280;
width-request: 300;

Box {
margin-start: 8;
Expand All @@ -40,58 +40,137 @@ template $PsequelQueryView : Adw.Bin {

Separator {}

Box {
Adw.ViewSwitcher tables_views_switcher {

styles ["big-icon"]
height-request: 40;
margin-start: 8;
margin-end: 8;
margin-top: 4;
margin-bottom: 8;

Label {
styles ["title-3"]
margin-top: 8;
margin-start: 4;
halign: start;
margin-bottom: 0;
label: "Tables";
}

Separator {
hexpand: true;
styles ["spacer"]
}

ToggleButton search_btn {
styles ["flat"]
tooltip-text: "Search tables";
icon-name: "loupe-large-symbolic";

toggled => $on_show_search();
}

margin-top: 8;
// margin-bottom: 8;
policy: wide;
stack: sql_views;
}



Revealer {
transition-duration: 300;
reveal-child: bind search_btn.active;
styles ["background"]
SearchEntry search_entry {
placeholder-text: "Search Tables";
margin-start: 4;
margin-bottom: 4;
Adw.ViewStack sql_views {
hexpand: true;
vexpand: true;
Adw.ViewStackPage {
icon-name: "table-symbolic";

child: Box {
orientation: vertical;
Box {
margin-start: 8;
margin-end: 8;
margin-top: 4;
margin-bottom: 8;

Label {
styles ["title-3"]
margin-top: 8;
margin-start: 4;
halign: start;
margin-bottom: 0;
label: "Tables";
}

Separator {
hexpand: true;
styles ["spacer"]
}

ToggleButton search_btn {
styles ["flat"]
tooltip-text: "Search tables";
icon-name: "loupe-large-symbolic";

toggled => $on_show_search();
}
}

search-changed => $on_search();
Revealer {
transition-duration: 300;
reveal-child: bind search_btn.active;
styles ["background"]
SearchEntry search_table_entry {
placeholder-text: "Search Tables";
margin-start: 4;
margin-bottom: 4;

search-changed => $on_search();
}

}

ScrolledWindow {
vexpand: true;
ListBox table_list {
styles ["navigation-sidebar"]
selected-rows-changed => $table_selected();
}

}
};
}

}

ScrolledWindow {
vexpand: true;
ListBox table_list {
styles ["navigation-sidebar"]

Adw.ViewStackPage {
icon-name: "category-search-symbolic";

child: Box {
orientation: vertical;
Box {
margin-start: 8;
margin-end: 8;
margin-top: 4;
margin-bottom: 8;

Label {
styles ["title-3"]
margin-top: 8;
margin-start: 4;
halign: start;
margin-bottom: 0;
label: "Views";
}

Separator {
hexpand: true;
styles ["spacer"]
}

ToggleButton search_views_btn {
styles ["flat"]
tooltip-text: "Search tables";
icon-name: "loupe-large-symbolic";

toggled => $on_show_view_search();
}
}

Revealer {
transition-duration: 300;
reveal-child: bind search_views_btn.active;
styles ["background"]
SearchEntry search_views_entry {
placeholder-text: "Search Views";
margin-start: 4;
margin-bottom: 4;

search-changed => $on_view_search();
}

}

ScrolledWindow {
vexpand: true;
ListBox views_list {
styles ["navigation-sidebar"]
selected-rows-changed => $view_selected();
}
}
};
}

}

Box {
Expand Down
4 changes: 4 additions & 0 deletions res/gtk/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.text-bold {
font-size: 105%;
}

.big-icon image {
-gtk-icon-size: 20px;
}
Empty file added res/gtk/table-data.blp
Empty file.
37 changes: 20 additions & 17 deletions res/gtk/table-structure.blp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ template $PsequelTableStructure : Gtk.Box {
margin-top: 12;
margin-bottom: 12;

styles ["frame"]

// width-request: 960;
// height-request: 800;
Expand All @@ -19,37 +18,41 @@ template $PsequelTableStructure : Gtk.Box {
label: "Columns";
halign: start;
}
ColumnView columns {

show-column-separators: true;
show-row-separators: true;
vexpand: true;
styles ["frame"]
ScrolledWindow {
ColumnView columns {
show-column-separators: true;
show-row-separators: true;
vexpand: true;
}
}

Label {
styles ["title-3"]
label: "Indexes";
halign: start;
}
ColumnView indexes {

ScrolledWindow {
ColumnView indexes {

show-column-separators: true;
show-row-separators: true;
styles ["frame"]
vexpand: true;
show-column-separators: true;
show-row-separators: true;
vexpand: true;
}
}

Label {
styles ["title-3"]
label: "Foreign Keys";
halign: start;
}
ColumnView foreign_key {

show-column-separators: true;
show-row-separators: true;
styles ["frame"]
vexpand: true;
ScrolledWindow {
ColumnView foreign_key {

show-column-separators: true;
show-row-separators: true;
vexpand: true;
}
}
}
2 changes: 1 addition & 1 deletion res/gtk/welcome.blp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ template $PsequelConnectionView : Adw.Bin {

[start]
$PsequelConnectionSidebar sidebar {
width-request: 280;
width-request: 300;
form: form;
}

Expand Down
1 change: 1 addition & 0 deletions res/psequel.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
<file preprocess="xml-stripblanks" alias="columns-symbolic.svg">gtk/icons/columns-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="step-out-symbolic.svg">gtk/icons/step-out-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="arrow-into-box-symbolic.svg">gtk/icons/arrow-into-box-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="category-search-symbolic.svg">gtk/icons/category-search-symbolic.svg</file>
</gresource>
</gresources>
2 changes: 1 addition & 1 deletion src/application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace Psequel {
}

query_service = new QueryService (background);
table_list = new ObservableArrayList<Table.Row> ();
table_list = new ObservableArrayList<Relation.Row> ();
signals = new AppSignals ();

load_user_data ();
Expand Down
Loading