diff options
author | fluxgen <fluxgen> | 2003-04-25 11:19:45 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-25 11:19:45 (GMT) |
commit | 9f0885bcbe2da232b5084d078ad7970a05f9b355 (patch) | |
tree | 932aa3c26e3f2c581d537f03274c5f19ce38e967 | |
parent | 8bbc39b8d078cbf3e62a724f67228c4e865e171c (diff) | |
download | fluxbox_pavel-9f0885bcbe2da232b5084d078ad7970a05f9b355.zip fluxbox_pavel-9f0885bcbe2da232b5084d078ad7970a05f9b355.tar.bz2 |
update for rootheme
-rw-r--r-- | src/Toolbar.cc | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 58bf1c4..d3d393e 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Toolbar.cc,v 1.73 2003/04/23 00:17:51 fluxgen Exp $ | 25 | // $Id: Toolbar.cc,v 1.74 2003/04/25 11:19:45 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Toolbar.hh" | 27 | #include "Toolbar.hh" |
28 | 28 | ||
@@ -39,6 +39,7 @@ | |||
39 | #include "SimpleCommand.hh" | 39 | #include "SimpleCommand.hh" |
40 | #include "IntResMenuItem.hh" | 40 | #include "IntResMenuItem.hh" |
41 | #include "MacroCommand.hh" | 41 | #include "MacroCommand.hh" |
42 | #include "RootTheme.hh" | ||
42 | 43 | ||
43 | // use GNU extensions | 44 | // use GNU extensions |
44 | #ifndef _GNU_SOURCE | 45 | #ifndef _GNU_SOURCE |
@@ -401,7 +402,7 @@ void Toolbar::reconfigure() { | |||
401 | if (m_iconbar.get()) | 402 | if (m_iconbar.get()) |
402 | m_iconbar->setVertical(vertical); | 403 | m_iconbar->setVertical(vertical); |
403 | 404 | ||
404 | frame.bevel_w = screen().getBevelWidth(); | 405 | frame.bevel_w = screen().rootTheme().bevelWidth(); |
405 | 406 | ||
406 | // recallibrate size | 407 | // recallibrate size |
407 | setPlacement(m_place); | 408 | setPlacement(m_place); |
@@ -639,8 +640,8 @@ void Toolbar::reconfigure() { | |||
639 | if (tmp) | 640 | if (tmp) |
640 | image_ctrl.removeImage(tmp); | 641 | image_ctrl.removeImage(tmp); |
641 | 642 | ||
642 | frame.window.setBorderColor(*screen().getBorderColor()); | 643 | frame.window.setBorderColor(screen().rootTheme().borderColor()); |
643 | frame.window.setBorderWidth(screen().getBorderWidth()); | 644 | frame.window.setBorderWidth(screen().rootTheme().borderWidth()); |
644 | 645 | ||
645 | frame.window.clear(); | 646 | frame.window.clear(); |
646 | 647 | ||
@@ -844,7 +845,7 @@ void Toolbar::edit() { | |||
844 | fluxbox->getFocusedWindow()->setFocusFlag(false); | 845 | fluxbox->getFocusedWindow()->setFocusFlag(false); |
845 | 846 | ||
846 | XDrawRectangle(display, frame.workspace_label.window(), | 847 | XDrawRectangle(display, frame.workspace_label.window(), |
847 | screen().getWindowStyle()->l_text_focus_gc, | 848 | screen().winFrameTheme().labelTextFocusGC(), |
848 | frame.workspace_label_w / 2, 0, 1, | 849 | frame.workspace_label_w / 2, 0, 1, |
849 | frame.label_h - 1); | 850 | frame.label_h - 1); |
850 | } | 851 | } |
@@ -1030,15 +1031,15 @@ void Toolbar::keyPressEvent(XKeyEvent &ke) { | |||
1030 | x = tmp; | 1031 | x = tmp; |
1031 | } | 1032 | } |
1032 | 1033 | ||
1033 | m_theme.font().drawText( | 1034 | m_theme.font().drawText(frame.workspace_label.window(), |
1034 | frame.workspace_label.window(), | ||
1035 | screen().getScreenNumber(), | 1035 | screen().getScreenNumber(), |
1036 | screen().getWindowStyle()->l_text_focus_gc, | 1036 | screen().winFrameTheme().labelTextFocusGC(), |
1037 | new_workspace_name.c_str(), l, | 1037 | new_workspace_name.c_str(), l, |
1038 | x, dy); | 1038 | x, dy); |
1039 | 1039 | ||
1040 | XDrawRectangle(display, frame.workspace_label.window(), | 1040 | XDrawRectangle(display, frame.workspace_label.window(), |
1041 | screen().getWindowStyle()->l_text_focus_gc, x + tw, 0, 1, | 1041 | screen().winFrameTheme().labelTextFocusGC(), |
1042 | x + tw, 0, 1, | ||
1042 | frame.label_h - 1); | 1043 | frame.label_h - 1); |
1043 | } | 1044 | } |
1044 | } | 1045 | } |
@@ -1094,15 +1095,17 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
1094 | frame.y = head_y; | 1095 | frame.y = head_y; |
1095 | frame.x_hidden = head_x; | 1096 | frame.x_hidden = head_x; |
1096 | frame.y_hidden = head_y + | 1097 | frame.y_hidden = head_y + |
1097 | screen().getBevelWidth() - screen().getBorderWidth() - frame.height; | 1098 | screen().rootTheme().bevelWidth() - |
1099 | screen().rootTheme().borderWidth() - frame.height; | ||
1098 | break; | 1100 | break; |
1099 | 1101 | ||
1100 | case BOTTOMLEFT: | 1102 | case BOTTOMLEFT: |
1101 | frame.x = head_x; | 1103 | frame.x = head_x; |
1102 | frame.y = head_y + head_h - frame.height - screen().getBorderWidth2x(); | 1104 | frame.y = head_y + head_h - frame.height - |
1105 | screen().rootTheme().borderWidth()*2; | ||
1103 | frame.x_hidden = head_x; | 1106 | frame.x_hidden = head_x; |
1104 | frame.y_hidden = head_y + head_h - screen().getBevelWidth() - | 1107 | frame.y_hidden = head_y + head_h - screen().rootTheme().bevelWidth() - |
1105 | screen().getBorderWidth(); | 1108 | screen().rootTheme().borderWidth(); |
1106 | break; | 1109 | break; |
1107 | 1110 | ||
1108 | case TOPCENTER: | 1111 | case TOPCENTER: |
@@ -1110,70 +1113,73 @@ void Toolbar::setPlacement(Toolbar::Placement where) { | |||
1110 | frame.y = head_y; | 1113 | frame.y = head_y; |
1111 | frame.x_hidden = frame.x; | 1114 | frame.x_hidden = frame.x; |
1112 | frame.y_hidden = head_y + | 1115 | frame.y_hidden = head_y + |
1113 | screen().getBevelWidth() - screen().getBorderWidth() - frame.height; | 1116 | screen().rootTheme().bevelWidth() - |
1117 | screen().rootTheme().borderWidth() - frame.height; | ||
1114 | break; | 1118 | break; |
1115 | case TOPRIGHT: | 1119 | case TOPRIGHT: |
1116 | frame.x = head_x + head_w - frame.width - screen().getBorderWidth2x(); | 1120 | frame.x = head_x + head_w - frame.width - screen().rootTheme().borderWidth()*2; |
1117 | frame.y = head_y; | 1121 | frame.y = head_y; |
1118 | frame.x_hidden = frame.x; | 1122 | frame.x_hidden = frame.x; |
1119 | break; | 1123 | break; |
1120 | 1124 | ||
1121 | case BOTTOMRIGHT: | 1125 | case BOTTOMRIGHT: |
1122 | frame.x = head_x + head_w - frame.width - screen().getBorderWidth2x(); | 1126 | frame.x = head_x + head_w - frame.width - |
1123 | frame.y = head_y + head_h - frame.height - screen().getBorderWidth2x(); | 1127 | screen().rootTheme().borderWidth()*2; |
1128 | frame.y = head_y + head_h - frame.height - | ||
1129 | screen().rootTheme().borderWidth()*2; | ||
1124 | frame.x_hidden = frame.x; | 1130 | frame.x_hidden = frame.x; |
1125 | frame.y_hidden = head_y + head_h - screen().getBevelWidth() - | 1131 | frame.y_hidden = head_y + head_h - screen().rootTheme().bevelWidth() - |
1126 | screen().getBorderWidth(); | 1132 | screen().rootTheme().borderWidth(); |
1127 | break; | 1133 | break; |
1128 | 1134 | ||
1129 | case BOTTOMCENTER: // default is BOTTOMCENTER | 1135 | case BOTTOMCENTER: // default is BOTTOMCENTER |
1130 | default: | 1136 | default: |
1131 | frame.x = head_x + (head_w - frame.width) / 2; | 1137 | frame.x = head_x + (head_w - frame.width) / 2; |
1132 | frame.y = head_y + head_h - frame.height - screen().getBorderWidth2x(); | 1138 | frame.y = head_y + head_h - frame.height - screen().rootTheme().borderWidth()*2; |
1133 | frame.x_hidden = frame.x; | 1139 | frame.x_hidden = frame.x; |
1134 | frame.y_hidden = head_y + head_h - screen().getBevelWidth() - | 1140 | frame.y_hidden = head_y + head_h - screen().rootTheme().bevelWidth() - |
1135 | screen().getBorderWidth(); | 1141 | screen().rootTheme().borderWidth(); |
1136 | break; | 1142 | break; |
1137 | case LEFTCENTER: | 1143 | case LEFTCENTER: |
1138 | frame.x = head_x; | 1144 | frame.x = head_x; |
1139 | frame.y = head_y + (head_h - frame.height)/2; | 1145 | frame.y = head_y + (head_h - frame.height)/2; |
1140 | frame.x_hidden = frame.x - frame.width + | 1146 | frame.x_hidden = frame.x - frame.width + |
1141 | screen().getBevelWidth() + screen().getBorderWidth(); | 1147 | screen().rootTheme().bevelWidth() + screen().rootTheme().borderWidth(); |
1142 | frame.y_hidden = frame.y; | 1148 | frame.y_hidden = frame.y; |
1143 | break; | 1149 | break; |
1144 | case LEFTTOP: | 1150 | case LEFTTOP: |
1145 | frame.x = head_x; | 1151 | frame.x = head_x; |
1146 | frame.y = head_y; | 1152 | frame.y = head_y; |
1147 | frame.x_hidden = frame.x - frame.width + | 1153 | frame.x_hidden = frame.x - frame.width + |
1148 | screen().getBevelWidth() + screen().getBorderWidth(); | 1154 | screen().rootTheme().bevelWidth() + screen().rootTheme().borderWidth(); |
1149 | frame.y_hidden = frame.y; | 1155 | frame.y_hidden = frame.y; |
1150 | break; | 1156 | break; |
1151 | case LEFTBOTTOM: | 1157 | case LEFTBOTTOM: |
1152 | frame.x = head_x; | 1158 | frame.x = head_x; |
1153 | frame.y = head_y + head_h - frame.height; | 1159 | frame.y = head_y + head_h - frame.height; |
1154 | frame.x_hidden = frame.x - frame.width + | 1160 | frame.x_hidden = frame.x - frame.width + |
1155 | screen().getBevelWidth() + screen().getBorderWidth(); | 1161 | screen().rootTheme().bevelWidth() + screen().rootTheme().borderWidth(); |
1156 | frame.y_hidden = frame.y; | 1162 | frame.y_hidden = frame.y; |
1157 | break; | 1163 | break; |
1158 | case RIGHTCENTER: | 1164 | case RIGHTCENTER: |
1159 | frame.x = head_x + head_w - frame.width; | 1165 | frame.x = head_x + head_w - frame.width; |
1160 | frame.y = head_y + (head_h - frame.height)/2; | 1166 | frame.y = head_y + (head_h - frame.height)/2; |
1161 | frame.x_hidden = frame.x + frame.width - | 1167 | frame.x_hidden = frame.x + frame.width - |
1162 | screen().getBevelWidth() - screen().getBorderWidth(); | 1168 | screen().rootTheme().bevelWidth() - screen().rootTheme().borderWidth(); |
1163 | frame.y_hidden = frame.y; | 1169 | frame.y_hidden = frame.y; |
1164 | break; | 1170 | break; |
1165 | case RIGHTTOP: | 1171 | case RIGHTTOP: |
1166 | frame.x = head_x + head_w - frame.width; | 1172 | frame.x = head_x + head_w - frame.width; |
1167 | frame.y = head_y; | 1173 | frame.y = head_y; |
1168 | frame.x_hidden = frame.x + frame.width - | 1174 | frame.x_hidden = frame.x + frame.width - |
1169 | screen().getBevelWidth() - screen().getBorderWidth(); | 1175 | screen().rootTheme().bevelWidth() - screen().rootTheme().borderWidth(); |
1170 | frame.y_hidden = frame.y; | 1176 | frame.y_hidden = frame.y; |
1171 | break; | 1177 | break; |
1172 | case RIGHTBOTTOM: | 1178 | case RIGHTBOTTOM: |
1173 | frame.x = head_x + head_w - frame.width; | 1179 | frame.x = head_x + head_w - frame.width; |
1174 | frame.y = head_y + head_h - frame.height; | 1180 | frame.y = head_y + head_h - frame.height; |
1175 | frame.x_hidden = frame.x + frame.width - | 1181 | frame.x_hidden = frame.x + frame.width - |
1176 | screen().getBevelWidth() - screen().getBorderWidth(); | 1182 | screen().rootTheme().bevelWidth() - screen().rootTheme().borderWidth(); |
1177 | frame.y_hidden = frame.y; | 1183 | frame.y_hidden = frame.y; |
1178 | break; | 1184 | break; |
1179 | } | 1185 | } |