all repos — fluxbox @ ccd693067e85b6049a9d61dc33338ecd6e8c22ee

custom fork of the fluxbox windowmanager

added menu border color and border width and bevel width
fluxgen fluxgen
commit

ccd693067e85b6049a9d61dc33338ecd6e8c22ee

parent

41bee7797df219de59c4999bf8464fc3cd57c407

2 files changed, 27 insertions(+), 2 deletions(-)

jump to
M src/FbTk/MenuTheme.ccsrc/FbTk/MenuTheme.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.cc,v 1.1 2002/12/25 11:42:05 fluxgen Exp $ +// $Id: MenuTheme.cc,v 1.2 2003/01/09 16:51:52 fluxgen Exp $ #include "MenuTheme.hh"

@@ -47,6 +47,9 @@ framefont_justify(*this, "menu.frame.justify", "Menu.Frame.Justify"),

titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), bullet_pos(*this, "menu.bulletPos", "Menu.BulletPos"), m_bullet(*this, "menu.bullet", "Menu.Bullet"), + m_border_width(*this, "borderWidth", "BorderWidth"), + m_bevel_width(*this, "bevelWidth", "BevelWidth"), + m_border_color(*this, "borderColor", "BorderColor"), m_display(FbTk::App::instance()->display()) { Window rootwindow = RootWindow(m_display, screen_num);

@@ -131,5 +134,20 @@ template <>

void ThemeItem<MenuTheme::BulletType>::load() { // do nothing, we don't have anything extra to load } + +template <> +void ThemeItem<unsigned int>::setDefaultValue() { + m_value = 0; +} + +template <> +void ThemeItem<unsigned int>::setFromString(const char *str) { + sscanf(str, "%d", &m_value); +} + +template <> +void ThemeItem<unsigned int>::load() { +} + }; // end namespace FbTk
M src/FbTk/MenuTheme.hhsrc/FbTk/MenuTheme.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.hh,v 1.1 2002/12/25 11:41:53 fluxgen Exp $ +// $Id: MenuTheme.hh,v 1.2 2003/01/09 16:47:06 fluxgen Exp $ #ifndef FBTK_MENUTHEME_HH #define FBTK_MENUTHEME_HH

@@ -79,6 +79,9 @@ ///@}

BulletType bullet() const { return *m_bullet; } FbTk::Justify bulletPos() const { return *bullet_pos; } + unsigned int borderWidth() const { return *m_border_width; } + unsigned int bevelWidth() const { return *m_bevel_width; } + const FbTk::Color &borderColor() const { return *m_border_color; } private: FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text; FbTk::ThemeItem<FbTk::Texture> title, frame, hilite;

@@ -86,6 +89,10 @@ FbTk::ThemeItem<FbTk::Font> titlefont, framefont;

FbTk::ThemeItem<FbTk::Justify> framefont_justify, titlefont_justify; FbTk::ThemeItem<FbTk::Justify> bullet_pos; FbTk::ThemeItem<BulletType> m_bullet; + FbTk::ThemeItem<unsigned int> m_border_width; + FbTk::ThemeItem<unsigned int> m_bevel_width; + FbTk::ThemeItem<FbTk::Color> m_border_color; + Display *m_display; GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc;