33 const QRect geo(0, 0, 1, 1);
34 const uint32_t values[] = {
true};
36 m_leftOutline.
create(geo, XCB_CW_OVERRIDE_REDIRECT, values);
37 m_rightOutline.
create(geo, XCB_CW_OVERRIDE_REDIRECT, values);
38 m_topOutline.
create(geo, XCB_CW_OVERRIDE_REDIRECT, values);
39 m_bottomOutline.
create(geo, XCB_CW_OVERRIDE_REDIRECT, values);
43 const int defaultDepth = Xcb::defaultDepth();
47 const uint16_t verticalWidth = 5;
48 const uint16_t verticalHeight = outlineGeometry.height() - 10;
49 const uint16_t horizontalWidth = outlineGeometry.width();
50 const uint horizontalHeight = 5;
51 m_leftOutline.
setGeometry(outlineGeometry.x(), outlineGeometry.y() + 5, verticalWidth, verticalHeight);
52 m_rightOutline.
setGeometry(outlineGeometry.x() + outlineGeometry.width() - 5, outlineGeometry.y() + 5, verticalWidth, verticalHeight);
53 m_topOutline.
setGeometry(outlineGeometry.x(), outlineGeometry.y(), horizontalWidth, horizontalHeight);
54 m_bottomOutline.
setGeometry(outlineGeometry.x(), outlineGeometry.y() + outlineGeometry.height() - 5, horizontalWidth, horizontalHeight);
56 const xcb_render_color_t white = {0xffff, 0xffff, 0xffff, 0xffff};
57 QColor qGray(Qt::gray);
58 const xcb_render_color_t gray = {
59 uint16_t(0xffff * qGray.redF()),
60 uint16_t(0xffff * qGray.greenF()),
61 uint16_t(0xffff * qGray.blueF()),
63 const xcb_render_color_t black = {0, 0, 0, 0xffff};
65 xcb_pixmap_t xpix = xcb_generate_id(
connection());
66 xcb_create_pixmap(
connection(), defaultDepth, xpix,
rootWindow(), verticalWidth, verticalHeight);
69 xcb_rectangle_t rect = {0, 0, 5, verticalHeight};
70 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, white, 1, &rect);
73 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, gray, 1, &rect);
76 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, black, 1, &rect);
84 xcb_pixmap_t xpix = xcb_generate_id(
connection());
85 xcb_create_pixmap(
connection(), defaultDepth, xpix,
rootWindow(), horizontalWidth, horizontalHeight);
88 xcb_rectangle_t rect = {0, 0, horizontalWidth, horizontalHeight};
89 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, white, 1, &rect);
90 xcb_rectangle_t grayRects[] = {
91 {1, 1, uint16_t(horizontalWidth - 2), 3},
93 {int16_t(horizontalWidth - 4), 4, 3, 1}};
94 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, gray, 3, grayRects);
95 xcb_rectangle_t blackRects[] = {
96 {2, 2, uint16_t(horizontalWidth - 4), 1},
98 {int16_t(horizontalWidth - 3), 3, 1, 2}};
99 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, black, 3, blackRects);
105 xcb_pixmap_t xpix = xcb_generate_id(
connection());
109 xcb_rectangle_t rect = {0, 0, horizontalWidth, horizontalHeight};
110 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, white, 1, &rect);
111 xcb_rectangle_t grayRects[] = {
112 {1, 1, uint16_t(horizontalWidth - 2), 3},
114 {int16_t(horizontalWidth - 4), 0, 3, 1}};
115 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, gray, 3, grayRects);
116 xcb_rectangle_t blackRects[] = {
117 {2, 2, uint16_t(horizontalWidth - 4), 1},
119 {int16_t(horizontalWidth - 3), 0, 1, 2}};
120 xcb_render_fill_rectangles(
connection(), XCB_RENDER_PICT_OP_SRC, pic, black, 3, blackRects);