summaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc35
1 files changed, 15 insertions, 20 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 36bf251..5cc7631 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -563,19 +563,14 @@ void FbWinFrame::removeAllButtons() {
563 } 563 }
564} 564}
565 565
566IconButton *FbWinFrame::createTab(Focusable &client) { 566void FbWinFrame::createTab(FbTk::Button &button) {
567 IconButton *button = new IconButton(m_tab_container, theme()->iconbarTheme(), 567 button.show();
568 client); 568 button.setEventMask(ExposureMask | ButtonPressMask |
569 ButtonReleaseMask | ButtonMotionMask |
570 EnterWindowMask);
571 FbTk::EventManager::instance()->add(button, button.window());
569 572
570 button->show(); 573 m_tab_container.insertItem(&button);
571 button->setEventMask(ExposureMask | ButtonPressMask |
572 ButtonReleaseMask | ButtonMotionMask |
573 EnterWindowMask);
574 FbTk::EventManager::instance()->add(*button, button->window());
575
576 m_tab_container.insertItem(button);
577
578 return button;
579} 574}
580 575
581void FbWinFrame::removeTab(IconButton *btn) { 576void FbWinFrame::removeTab(IconButton *btn) {
@@ -1140,11 +1135,11 @@ void FbWinFrame::renderTitlebar() {
1140 1135
1141 //!! TODO: don't render label if internal tabs 1136 //!! TODO: don't render label if internal tabs
1142 1137
1143 render(theme()->iconbarTheme()->focusedTexture(), m_label_focused_color, 1138 render(theme()->focusedIconbarTheme()->texture(), m_label_focused_color,
1144 m_label_focused_pm, 1139 m_label_focused_pm,
1145 m_label.width(), m_label.height()); 1140 m_label.width(), m_label.height());
1146 1141
1147 render(theme()->iconbarTheme()->unfocusedTexture(), m_label_unfocused_color, 1142 render(theme()->unfocusedIconbarTheme()->texture(), m_label_unfocused_color,
1148 m_label_unfocused_pm, 1143 m_label_unfocused_pm,
1149 m_label.width(), m_label.height()); 1144 m_label.width(), m_label.height());
1150 1145
@@ -1156,8 +1151,8 @@ void FbWinFrame::renderTabContainer() {
1156 return; 1151 return;
1157 } 1152 }
1158 1153
1159 const FbTk::Texture *tc_focused = &theme()->iconbarTheme()->focusedTexture(); 1154 const FbTk::Texture *tc_focused = &theme()->focusedIconbarTheme()->texture();
1160 const FbTk::Texture *tc_unfocused = &theme()->iconbarTheme()->unfocusedTexture(); 1155 const FbTk::Texture *tc_unfocused = &theme()->unfocusedIconbarTheme()->texture();
1161 1156
1162 if (m_tabmode == EXTERNAL && tc_focused->type() & FbTk::Texture::PARENTRELATIVE) 1157 if (m_tabmode == EXTERNAL && tc_focused->type() & FbTk::Texture::PARENTRELATIVE)
1163 tc_focused = &theme()->titleFocusTexture(); 1158 tc_focused = &theme()->titleFocusTexture();
@@ -1192,11 +1187,11 @@ void FbWinFrame::applyTitlebar() {
1192 1187
1193 if (m_tabmode != INTERNAL) { 1188 if (m_tabmode != INTERNAL) {
1194 m_label.setGC(m_focused ? 1189 m_label.setGC(m_focused ?
1195 theme()->iconbarTheme()->focusedText().textGC() : 1190 theme()->focusedIconbarTheme()->text().textGC() :
1196 theme()->iconbarTheme()->unfocusedText().textGC()); 1191 theme()->unfocusedIconbarTheme()->text().textGC());
1197 m_label.setJustify(m_focused ? 1192 m_label.setJustify(m_focused ?
1198 theme()->iconbarTheme()->focusedText().justify() : 1193 theme()->focusedIconbarTheme()->text().justify() :
1199 theme()->iconbarTheme()->unfocusedText().justify()); 1194 theme()->unfocusedIconbarTheme()->text().justify());
1200 1195
1201 if (label_pm != 0) 1196 if (label_pm != 0)
1202 m_label.setBackgroundPixmap(label_pm); 1197 m_label.setBackgroundPixmap(label_pm);