diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-06 17:52:21 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-06 17:52:21 +0300 |
commit | 0f47f2f20dd5e6f098f4358cdfea50cf2e87bc56 (patch) | |
tree | 11ac0763810b623f80b5532a0b690b856f461e4e /src/ui/window.c | |
parent | 9f3378737bf957c1b31412dd28ffcfc7d504b2e3 (diff) |
Window: Added a tab bar
This should be collapsed if there is just a single tab.
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index eaab6ac5..59d6a11a 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -218,8 +218,15 @@ static void setupUserInterface_Window(iWindow *d) { | |||
218 | addChild_Widget(navBar, iClob(newIcon_LabelWidget("\U0001d362", 0, 0, "navbar.menu"))); | 218 | addChild_Widget(navBar, iClob(newIcon_LabelWidget("\U0001d362", 0, 0, "navbar.menu"))); |
219 | } | 219 | } |
220 | 220 | ||
221 | addChildFlags_Widget(div, iClob(new_DocumentWidget()), expand_WidgetFlag); | 221 | /* Tab bar. */ { |
222 | 222 | iWidget *tabBar = makeTabs_Widget(div); | |
223 | setId_Widget(tabBar, "doctabs"); | ||
224 | setFlags_Widget(tabBar, expand_WidgetFlag, iTrue); | ||
225 | setBackgroundColor_Widget(tabBar, gray25_ColorId); | ||
226 | appendTabPage_Widget(tabBar, iClob(new_DocumentWidget()), "Document", '1', KMOD_PRIMARY); | ||
227 | addChild_Widget(findChild_Widget(tabBar, "tabs.buttons"), | ||
228 | iClob(newIcon_LabelWidget("\u2795", 't', KMOD_PRIMARY, "tabs.new"))); | ||
229 | } | ||
223 | /* Search bar. */ { | 230 | /* Search bar. */ { |
224 | iWidget *searchBar = new_Widget(); | 231 | iWidget *searchBar = new_Widget(); |
225 | setId_Widget(searchBar, "search"); | 232 | setId_Widget(searchBar, "search"); |
@@ -236,7 +243,7 @@ static void setupUserInterface_Window(iWindow *d) { | |||
236 | "find.input"); | 243 | "find.input"); |
237 | addChild_Widget(searchBar, iClob(newIcon_LabelWidget(" \u2b9f ", 'g', KMOD_PRIMARY, "find.next"))); | 244 | addChild_Widget(searchBar, iClob(newIcon_LabelWidget(" \u2b9f ", 'g', KMOD_PRIMARY, "find.next"))); |
238 | addChild_Widget(searchBar, iClob(newIcon_LabelWidget(" \u2b9d ", 'g', KMOD_PRIMARY | KMOD_SHIFT, "find.prev"))); | 245 | addChild_Widget(searchBar, iClob(newIcon_LabelWidget(" \u2b9d ", 'g', KMOD_PRIMARY | KMOD_SHIFT, "find.prev"))); |
239 | addChild_Widget(searchBar, iClob(newIcon_LabelWidget("\U0001f7a8", SDLK_ESCAPE, 0, "find.close"))); | 246 | addChild_Widget(searchBar, iClob(newIcon_LabelWidget("\u2a2f", SDLK_ESCAPE, 0, "find.close"))); |
240 | } | 247 | } |
241 | 248 | ||
242 | #if 0 | 249 | #if 0 |