all repos — fluxbox @ 456792bbeb7a3acfec05c538375a0d001c700cbf

custom fork of the fluxbox windowmanager

rearranged themes and added WinButtonTheme
fluxgen fluxgen
commit

456792bbeb7a3acfec05c538375a0d001c700cbf

parent

3f62d0e80817935d071ff4074e282cdb9fb438fb

2 files changed, 19 insertions(+), 17 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,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: Screen.cc,v 1.141 2003/04/28 12:58:08 rathnor Exp $ +// $Id: Screen.cc,v 1.142 2003/04/28 22:43:26 fluxgen Exp $ #include "Screen.hh"

@@ -41,7 +41,7 @@ #include "SimpleCommand.hh"

#include "FbWinFrameTheme.hh" #include "MenuTheme.hh" #include "RootTheme.hh" -//#include "WinButtonTheme.hh" +#include "WinButtonTheme.hh" #include "FbCommands.hh" #include "BoolMenuItem.hh" #include "IntResMenuItem.hh"

@@ -504,12 +504,15 @@ m_layermanager(num_layers),

cycling_focus(false), cycling_last(0), m_windowtheme(new FbWinFrameTheme(scrn)), + // the order of windowtheme and winbutton theme is important + // because winbutton need to rescale the pixmaps in winbutton theme + // after fbwinframe have resized them + m_winbutton_theme(new WinButtonTheme(scrn)), m_menutheme(new FbTk::MenuTheme(scrn)), - resource(rm, screenname, altscreenname), m_root_theme(new RootTheme(scrn, *resource.rootcommand)), - // m_winbutton_theme(new WinButtonTheme(scrn)), + resource(rm, screenname, altscreenname), m_toolbarhandler(0) {

@@ -827,14 +830,14 @@ // setup windowtheme, toolbartheme for antialias

winFrameTheme().font().setAntialias(*resource.antialias); m_menutheme->titleFont().setAntialias(*resource.antialias); m_menutheme->frameFont().setAntialias(*resource.antialias); + // load theme std::string theme_filename(Fluxbox::instance()->getStyleFilename()); FbTk::ThemeManager::instance().load(theme_filename.c_str()); I18n *i18n = I18n::instance(); - const char *s = i18n->getMessage( - FBNLS::ScreenSet, + const char *s = i18n->getMessage(FBNLS::ScreenSet, FBNLS::ScreenPositionLength, "W: 0000 x H: 0000"); int l = strlen(s);

@@ -907,6 +910,7 @@ iconList.end(),

mem_fun(&FluxboxWindow::reconfigure)); image_control->timeout(); + }

@@ -1332,14 +1336,14 @@ for (size_t i=0; i< dir->size(); ++i) {

//create new buttons FbTk::Button *newbutton = 0; if (win.isIconifiable() && (*dir)[i] == Fluxbox::MINIMIZE) { - newbutton = new WinButton(win, //*m_winbutton_theme.get(), + newbutton = new WinButton(win, *m_winbutton_theme.get(), WinButton::MINIMIZE, frame.titlebar(), 0, 0, 10, 10); newbutton->setOnClick(iconify_cmd); } else if (win.isMaximizable() && (*dir)[i] == Fluxbox::MAXIMIZE) { - newbutton = new WinButton(win, //*m_winbutton_theme.get(), + newbutton = new WinButton(win, *m_winbutton_theme.get(), WinButton::MAXIMIZE, frame.titlebar(), 0, 0, 10, 10);

@@ -1349,7 +1353,7 @@ newbutton->setOnClick(maximize_horiz_cmd, 3);

newbutton->setOnClick(maximize_vert_cmd, 2); } else if (win.isClosable() && (*dir)[i] == Fluxbox::CLOSE) { - newbutton = new WinButton(win, //*m_winbutton_theme.get(), + newbutton = new WinButton(win, *m_winbutton_theme.get(), WinButton::CLOSE, frame.titlebar(), 0, 0, 10, 10);

@@ -1359,7 +1363,7 @@ #ifdef DEBUG

cerr<<__FILE__<<": Creating close button"<<endl; #endif // DEBUG } else if ((*dir)[i] == Fluxbox::STICK) { - WinButton *winbtn = new WinButton(win, // *m_winbutton_theme.get(), + WinButton *winbtn = new WinButton(win, *m_winbutton_theme.get(), WinButton::STICK, frame.titlebar(), 0, 0, 10, 10);

@@ -1367,7 +1371,7 @@ win.stateSig().attach(winbtn);

winbtn->setOnClick(stick_cmd); newbutton = winbtn; } else if ((*dir)[i] == Fluxbox::SHADE) { - WinButton *winbtn = new WinButton(win, // *m_winbutton_theme.get(), + WinButton *winbtn = new WinButton(win, *m_winbutton_theme.get(), WinButton::SHADE, frame.titlebar(), 0, 0, 10, 10);

@@ -2031,10 +2035,6 @@ "BScreen::parseMenuFile: [restart] error, "

"no menu label defined\n")); cerr<<"Row: "<<row<<endl; } else { - /* if (str_cmd.size()) - menu.insert(str_label.c_str(), BScreen::RESTARTOTHER, str_cmd.c_str()); - else - */ FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd()); menu.insert(str_label.c_str(), restart_fb); }
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,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: Screen.hh,v 1.88 2003/04/27 14:36:04 rathnor Exp $ +// $Id: Screen.hh,v 1.89 2003/04/28 22:42:29 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -48,6 +48,7 @@ class Netizen;

class Toolbar; class FbWinFrameTheme; class RootTheme; +class WinButtonTheme; class WinClient; class Workspace;

@@ -373,7 +374,9 @@

Window auto_group_window; std::auto_ptr<FbWinFrameTheme> m_windowtheme; + std::auto_ptr<WinButtonTheme> m_winbutton_theme; std::auto_ptr<FbTk::MenuTheme> m_menutheme; + std::auto_ptr<RootTheme> m_root_theme; struct ScreenResource { ScreenResource(ResourceManager &rm, const std::string &scrname,

@@ -411,7 +414,6 @@

} resource; - std::auto_ptr<RootTheme> m_root_theme; ToolbarHandler *m_toolbarhandler; };