moved border color and width to frame theme
This commit is contained in:
parent
06a66cc304
commit
49f5eef946
3 changed files with 9 additions and 19 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: RootTheme.cc,v 1.3 2003/08/16 10:01:57 fluxgen Exp $
|
||||
// $Id: RootTheme.cc,v 1.4 2003/08/25 16:02:24 fluxgen Exp $
|
||||
|
||||
#include "RootTheme.hh"
|
||||
|
||||
|
@ -29,13 +29,10 @@
|
|||
RootTheme::RootTheme(int screen_num, std::string &screen_root_command):
|
||||
FbTk::Theme(screen_num),
|
||||
m_root_command(*this, "rootCommand", "RootCommand"),
|
||||
m_border_width(*this, "borderWidth", "BorderWidth"),
|
||||
m_bevel_width(*this, "bevelWidth", "BevelWidth"),
|
||||
m_handle_width(*this, "handleWidth", "HandleWidth"),
|
||||
m_border_color(*this, "borderColor", "BorderColor"),
|
||||
m_screen_root_command(screen_root_command) {
|
||||
|
||||
*m_border_width = 0;
|
||||
*m_bevel_width = 0;
|
||||
*m_handle_width = 0;
|
||||
|
||||
|
@ -55,10 +52,6 @@ RootTheme::~RootTheme() {
|
|||
}
|
||||
|
||||
void RootTheme::reconfigTheme() {
|
||||
// clamp values to "normal" size
|
||||
if (*m_border_width > 20)
|
||||
*m_border_width = 20;
|
||||
|
||||
if (*m_bevel_width > 20)
|
||||
*m_bevel_width = 20;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: RootTheme.hh,v 1.2 2003/05/10 13:45:50 fluxgen Exp $
|
||||
// $Id: RootTheme.hh,v 1.3 2003/08/25 16:02:24 fluxgen Exp $
|
||||
|
||||
#ifndef ROOTTHEME_HH
|
||||
#define ROOTTHEME_HH
|
||||
|
@ -42,16 +42,13 @@ public:
|
|||
|
||||
void reconfigTheme();
|
||||
|
||||
const FbTk::Color &borderColor() const { return *m_border_color; }
|
||||
int borderWidth() const { return *m_border_width; }
|
||||
int bevelWidth() const { return *m_bevel_width; }
|
||||
int handleWidth() const { return *m_handle_width; }
|
||||
GC opGC() const { return m_opgc; }
|
||||
|
||||
private:
|
||||
FbTk::ThemeItem<std::string> m_root_command;
|
||||
FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_handle_width;
|
||||
FbTk::ThemeItem<FbTk::Color> m_border_color;
|
||||
FbTk::ThemeItem<int> m_bevel_width, m_handle_width;
|
||||
std::string &m_screen_root_command; ///< string to execute and override theme rootCommand
|
||||
GC m_opgc;
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Screen.cc,v 1.226 2003/08/25 13:15:53 rathnor Exp $
|
||||
// $Id: Screen.cc,v 1.227 2003/08/25 16:07:09 fluxgen Exp $
|
||||
|
||||
|
||||
#include "Screen.hh"
|
||||
|
@ -358,7 +358,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
|||
|
||||
XSetWindowAttributes attrib;
|
||||
unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder;
|
||||
attrib.border_pixel = m_root_theme->borderColor().pixel();
|
||||
attrib.border_pixel = winFrameTheme().border().color().pixel();
|
||||
attrib.colormap = rootWindow().colormap();
|
||||
attrib.save_under = true;
|
||||
|
||||
|
@ -366,7 +366,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
|||
|
||||
m_geom_window =
|
||||
XCreateWindow(disp, rootWindow().window(),
|
||||
0, 0, geom_w, geom_h, rootTheme().borderWidth(), rootWindow().depth(),
|
||||
0, 0, geom_w, geom_h, winFrameTheme().border().width(), rootWindow().depth(),
|
||||
InputOutput, rootWindow().visual(), mask, &attrib);
|
||||
geom_visible = false;
|
||||
geom_pixmap = 0;
|
||||
|
@ -1463,7 +1463,7 @@ void BScreen::dirFocus(FluxboxWindow &win, FocusDir dir) {
|
|||
|
||||
FluxboxWindow *foundwin = 0;
|
||||
int weight = 999999, exposure = 0; // extreme values
|
||||
int borderW = m_root_theme->borderWidth(),
|
||||
int borderW = winFrameTheme().border().width(),
|
||||
top = win.y(),
|
||||
bottom = win.y() + win.height() + 2*borderW,
|
||||
left = win.x(),
|
||||
|
@ -2165,8 +2165,8 @@ void BScreen::renderGeomWindow() {
|
|||
int geom_w = winFrameTheme().font().textWidth(s, l) + m_root_theme->bevelWidth()*2;
|
||||
m_geom_window.resize(geom_w, geom_h);
|
||||
|
||||
m_geom_window.setBorderWidth(m_root_theme->borderWidth());
|
||||
m_geom_window.setBorderColor(m_root_theme->borderColor());
|
||||
m_geom_window.setBorderWidth(winFrameTheme().border().width());
|
||||
m_geom_window.setBorderColor(winFrameTheme().border().color());
|
||||
|
||||
|
||||
Pixmap tmp = geom_pixmap;
|
||||
|
|
Loading…
Reference in a new issue