summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-24 18:33:29 (GMT)
committerfluxgen <fluxgen>2003-06-24 18:33:29 (GMT)
commitcae1bf89be2f5be5cfefce0b2b820202553dae6e (patch)
tree0dae06f4bcf7b2ca8d56a43715b93793b328f8ef /src
parentcb40c162744cff4509386c9c263f4e4d372e9e32 (diff)
downloadfluxbox_lack-cae1bf89be2f5be5cfefce0b2b820202553dae6e.zip
fluxbox_lack-cae1bf89be2f5be5cfefce0b2b820202553dae6e.tar.bz2
using toolbar border width, color and bevel width
Diffstat (limited to 'src')
-rw-r--r--src/Toolbar.cc69
1 files changed, 28 insertions, 41 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index df5bd86..4906727 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.93 2003/06/23 13:17:57 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.94 2003/06/24 18:33:29 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -458,7 +458,7 @@ void Toolbar::reconfigure() {
458 if (m_iconbar.get()) 458 if (m_iconbar.get())
459 m_iconbar->setVertical(vertical); 459 m_iconbar->setVertical(vertical);
460 460
461 frame.bevel_w = screen().rootTheme().bevelWidth(); 461 frame.bevel_w = theme().bevelWidth();
462 462
463 // recallibrate size 463 // recallibrate size
464 setPlacement(placement()); 464 setPlacement(placement());
@@ -719,8 +719,8 @@ void Toolbar::reconfigure() {
719 if (tmp) 719 if (tmp)
720 image_ctrl.removeImage(tmp); 720 image_ctrl.removeImage(tmp);
721 721
722 frame.window.setBorderColor(screen().rootTheme().borderColor()); 722 frame.window.setBorderColor(theme().borderColor());
723 frame.window.setBorderWidth(screen().rootTheme().borderWidth()); 723 frame.window.setBorderWidth(theme().borderWidth());
724 724
725 frame.window.clear(); 725 frame.window.clear();
726 726
@@ -1157,6 +1157,8 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
1157 frame.height += 2; 1157 frame.height += 2;
1158 frame.height += (frame.bevel_w * 2); 1158 frame.height += (frame.bevel_w * 2);
1159 1159
1160 int bevel_width = theme().bevelWidth();
1161 int border_width = theme().borderWidth();
1160 1162
1161 // should we flipp sizes? 1163 // should we flipp sizes?
1162 if (isVertical()) { 1164 if (isVertical()) {
@@ -1179,92 +1181,77 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
1179 frame.x = head_x; 1181 frame.x = head_x;
1180 frame.y = head_y; 1182 frame.y = head_y;
1181 frame.x_hidden = head_x; 1183 frame.x_hidden = head_x;
1182 frame.y_hidden = head_y + 1184 frame.y_hidden = head_y + bevel_width - border_width - frame.height;
1183 screen().rootTheme().bevelWidth() -
1184 screen().rootTheme().borderWidth() - frame.height;
1185 break; 1185 break;
1186 1186
1187 case BOTTOMLEFT: 1187 case BOTTOMLEFT:
1188 frame.x = head_x; 1188 frame.x = head_x;
1189 frame.y = head_y + head_h - frame.height - 1189 frame.y = head_y + head_h - frame.height - border_width*2;
1190 screen().rootTheme().borderWidth()*2;
1191 frame.x_hidden = head_x; 1190 frame.x_hidden = head_x;
1192 frame.y_hidden = head_y + head_h - screen().rootTheme().bevelWidth() - 1191 frame.y_hidden = head_y + head_h - bevel_width - border_width;
1193 screen().rootTheme().borderWidth(); 1192
1194 break; 1193 break;
1195 1194
1196 case TOPCENTER: 1195 case TOPCENTER:
1197 frame.x = head_x + ((head_w - frame.width) / 2); 1196 frame.x = head_x + ((head_w - frame.width) / 2);
1198 frame.y = head_y; 1197 frame.y = head_y;
1199 frame.x_hidden = frame.x; 1198 frame.x_hidden = frame.x;
1200 frame.y_hidden = head_y + 1199 frame.y_hidden = head_y + bevel_width - border_width - frame.height;
1201 screen().rootTheme().bevelWidth() -
1202 screen().rootTheme().borderWidth() - frame.height;
1203 break; 1200 break;
1204 case TOPRIGHT: 1201 case TOPRIGHT:
1205 frame.x = head_x + head_w - frame.width - screen().rootTheme().borderWidth()*2; 1202 frame.x = head_x + head_w - frame.width - border_width*2;
1206 frame.y = head_y; 1203 frame.y = head_y;
1207 frame.x_hidden = frame.x; 1204 frame.x_hidden = frame.x;
1208 break; 1205 break;
1209 1206
1210 case BOTTOMRIGHT: 1207 case BOTTOMRIGHT:
1211 frame.x = head_x + head_w - frame.width - 1208 frame.x = head_x + head_w - frame.width - border_width*2;
1212 screen().rootTheme().borderWidth()*2; 1209 frame.y = head_y + head_h - frame.height - border_width*2;
1213 frame.y = head_y + head_h - frame.height -
1214 screen().rootTheme().borderWidth()*2;
1215 frame.x_hidden = frame.x; 1210 frame.x_hidden = frame.x;
1216 frame.y_hidden = head_y + head_h - screen().rootTheme().bevelWidth() - 1211 frame.y_hidden = head_y + head_h - bevel_width - border_width;
1217 screen().rootTheme().borderWidth();
1218 break; 1212 break;
1219 1213
1220 case BOTTOMCENTER: // default is BOTTOMCENTER 1214 case BOTTOMCENTER: // default is BOTTOMCENTER
1221 default: 1215 default:
1222 frame.x = head_x + (head_w - frame.width) / 2; 1216 frame.x = head_x + (head_w - frame.width) / 2;
1223 frame.y = head_y + head_h - frame.height - screen().rootTheme().borderWidth()*2; 1217 frame.y = head_y + head_h - frame.height - border_width*2;
1224 frame.x_hidden = frame.x; 1218 frame.x_hidden = frame.x;
1225 frame.y_hidden = head_y + head_h - screen().rootTheme().bevelWidth() - 1219 frame.y_hidden = head_y + head_h - bevel_width - border_width;
1226 screen().rootTheme().borderWidth();
1227 break; 1220 break;
1228 case LEFTCENTER: 1221 case LEFTCENTER:
1229 frame.x = head_x; 1222 frame.x = head_x;
1230 frame.y = head_y + (head_h - frame.height)/2; 1223 frame.y = head_y + (head_h - frame.height)/2;
1231 frame.x_hidden = frame.x - frame.width + 1224 frame.x_hidden = frame.x - frame.width + bevel_width + border_width;
1232 screen().rootTheme().bevelWidth() + screen().rootTheme().borderWidth();
1233 frame.y_hidden = frame.y; 1225 frame.y_hidden = frame.y;
1234 break; 1226 break;
1235 case LEFTTOP: 1227 case LEFTTOP:
1236 frame.x = head_x; 1228 frame.x = head_x;
1237 frame.y = head_y; 1229 frame.y = head_y;
1238 frame.x_hidden = frame.x - frame.width + 1230 frame.x_hidden = frame.x - frame.width + bevel_width + border_width;
1239 screen().rootTheme().bevelWidth() + screen().rootTheme().borderWidth();
1240 frame.y_hidden = frame.y; 1231 frame.y_hidden = frame.y;
1241 break; 1232 break;
1242 case LEFTBOTTOM: 1233 case LEFTBOTTOM:
1243 frame.x = head_x; 1234 frame.x = head_x;
1244 frame.y = head_y + head_h - frame.height - screen().rootTheme().borderWidth()*2; 1235 frame.y = head_y + head_h - frame.height - border_width*2;
1245 frame.x_hidden = frame.x - frame.width + 1236 frame.x_hidden = frame.x - frame.width + bevel_width + border_width;
1246 screen().rootTheme().bevelWidth() + screen().rootTheme().borderWidth();
1247 frame.y_hidden = frame.y; 1237 frame.y_hidden = frame.y;
1248 break; 1238 break;
1249 case RIGHTCENTER: 1239 case RIGHTCENTER:
1250 frame.x = head_x + head_w - frame.width - screen().rootTheme().borderWidth()*2; 1240 frame.x = head_x + head_w - frame.width - border_width*2;
1251 frame.y = head_y + (head_h - frame.height)/2; 1241 frame.y = head_y + (head_h - frame.height)/2;
1252 frame.x_hidden = frame.x + frame.width - 1242 frame.x_hidden = frame.x + frame.width - bevel_width - border_width;
1253 screen().rootTheme().bevelWidth() - screen().rootTheme().borderWidth();
1254 frame.y_hidden = frame.y; 1243 frame.y_hidden = frame.y;
1255 break; 1244 break;
1256 case RIGHTTOP: 1245 case RIGHTTOP:
1257 frame.x = head_x + head_w - frame.width - screen().rootTheme().borderWidth()*2; 1246 frame.x = head_x + head_w - frame.width - border_width*2;
1258 frame.y = head_y; 1247 frame.y = head_y;
1259 frame.x_hidden = frame.x + frame.width - 1248 frame.x_hidden = frame.x + frame.width - bevel_width - border_width;
1260 screen().rootTheme().bevelWidth() - screen().rootTheme().borderWidth();
1261 frame.y_hidden = frame.y; 1249 frame.y_hidden = frame.y;
1262 break; 1250 break;
1263 case RIGHTBOTTOM: 1251 case RIGHTBOTTOM:
1264 frame.x = head_x + head_w - frame.width - screen().rootTheme().borderWidth()*2; 1252 frame.x = head_x + head_w - frame.width - border_width*2;
1265 frame.y = head_y + head_h - frame.height - screen().rootTheme().borderWidth()*2; 1253 frame.y = head_y + head_h - frame.height - border_width*2;
1266 frame.x_hidden = frame.x + frame.width - 1254 frame.x_hidden = frame.x + frame.width - bevel_width - border_width;
1267 screen().rootTheme().bevelWidth() - screen().rootTheme().borderWidth();
1268 frame.y_hidden = frame.y; 1255 frame.y_hidden = frame.y;
1269 break; 1256 break;
1270 } 1257 }