diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-10 19:44:17 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-10 19:46:02 +0300 |
commit | 0b1ba1f49d999b2eceb0cb740a7a7a6a59529911 (patch) | |
tree | 6762efa565d31e34de96164ec667474914b0449c | |
parent | b2199d17a1ec8e7f06eda41633f83818dca996fe (diff) |
Add a sidebar next to the current tab
The sidebar is inside the tabs widget, as a sibling to the current page.
-rw-r--r-- | src/ui/util.c | 4 | ||||
-rw-r--r-- | src/ui/window.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 94528817..71539fa0 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -302,8 +302,10 @@ iWidget *makeTabs_Widget(iWidget *parent) { | |||
302 | arrangeHeight_WidgetFlag, | 302 | arrangeHeight_WidgetFlag, |
303 | iTrue); | 303 | iTrue); |
304 | setId_Widget(buttons, "tabs.buttons"); | 304 | setId_Widget(buttons, "tabs.buttons"); |
305 | iWidget *content = addChildFlags_Widget(tabs, iClob(makeHDiv_Widget()), expand_WidgetFlag); | ||
306 | setId_Widget(content, "tabs.content"); | ||
305 | iWidget *pages = addChildFlags_Widget( | 307 | iWidget *pages = addChildFlags_Widget( |
306 | tabs, iClob(new_Widget()), expand_WidgetFlag | resizeChildren_WidgetFlag); | 308 | content, iClob(new_Widget()), expand_WidgetFlag | resizeChildren_WidgetFlag); |
307 | setId_Widget(pages, "tabs.pages"); | 309 | setId_Widget(pages, "tabs.pages"); |
308 | addChild_Widget(parent, iClob(tabs)); | 310 | addChild_Widget(parent, iClob(tabs)); |
309 | setCommandHandler_Widget(tabs, tabSwitcher_); | 311 | setCommandHandler_Widget(tabs, tabSwitcher_); |
diff --git a/src/ui/window.c b/src/ui/window.c index 010a6707..10f1bba3 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "labelwidget.h" | 10 | #include "labelwidget.h" |
11 | #include "inputwidget.h" | 11 | #include "inputwidget.h" |
12 | #include "documentwidget.h" | 12 | #include "documentwidget.h" |
13 | #include "sidebarwidget.h" | ||
13 | #include "gmutil.h" | 14 | #include "gmutil.h" |
14 | #if defined (iPlatformMsys) | 15 | #if defined (iPlatformMsys) |
15 | # include "../win32.h" | 16 | # include "../win32.h" |
@@ -278,6 +279,11 @@ static void setupUserInterface_Window(iWindow *d) { | |||
278 | addChild_Widget(buttons, iClob(newIcon_LabelWidget("\u2795", 0, 0, "tabs.new"))), | 279 | addChild_Widget(buttons, iClob(newIcon_LabelWidget("\u2795", 0, 0, "tabs.new"))), |
279 | "newtab"); | 280 | "newtab"); |
280 | } | 281 | } |
282 | /* Side bar. */ { | ||
283 | iWidget *content = findChild_Widget(d->root, "tabs.content"); | ||
284 | iSidebarWidget *sidebar = new_SidebarWidget(); | ||
285 | addChildPos_Widget(content, iClob(sidebar), front_WidgetAddPos); | ||
286 | } | ||
281 | /* Search bar. */ { | 287 | /* Search bar. */ { |
282 | iWidget *searchBar = new_Widget(); | 288 | iWidget *searchBar = new_Widget(); |
283 | setId_Widget(searchBar, "search"); | 289 | setId_Widget(searchBar, "search"); |