added maximize over resource and menu item

This commit is contained in:
fluxgen 2003-07-10 15:52:58 +00:00
parent a4e27110ac
commit 11673856e3
2 changed files with 9 additions and 5 deletions

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Toolbar.cc,v 1.99 2003/07/10 13:46:47 fluxgen Exp $
// $Id: Toolbar.cc,v 1.100 2003/07/10 15:52:58 fluxgen Exp $
#include "Toolbar.hh"
@ -264,6 +264,8 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
m_strut(0),
m_rc_auto_hide(scrn.resourceManager(), false,
scrn.name() + ".toolbar.autoHide", scrn.altName() + ".Toolbar.AutoHide"),
m_rc_maximize_over(scrn.resourceManager(), false,
scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"),
m_rc_width_percent(scrn.resourceManager(), 65,
scrn.name() + ".toolbar.widthPercent", scrn.altName() + ".Toolbar.WidthPercent"),
m_rc_layernum(scrn.resourceManager(), Fluxbox::Layer(Fluxbox::instance()->getDesktopLayer()),
@ -355,7 +357,7 @@ void Toolbar::updateStrut() {
clearStrut();
// we should request space if we're in autohide mode or
// if the user dont want to request space for toolbar.
if (doAutoHide()) {
if (doAutoHide() || *m_rc_maximize_over) {
if (had_strut)
screen().updateAvailableWorkspaceArea();
return;
@ -1380,7 +1382,8 @@ void Toolbar::setupMenus() {
"Auto hide"),
*m_rc_auto_hide,
reconfig_toolbar_and_save_resource));
menu.insert(new BoolMenuItem("Maximize Over", *m_rc_maximize_over,
reconfig_toolbar_and_save_resource));
menu.insert("Layer...", &tbar.layermenu());
if (tbar.screen().hasXinerama()) {

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Toolbar.hh,v 1.37 2003/07/10 11:45:22 fluxgen Exp $
// $Id: Toolbar.hh,v 1.38 2003/07/10 15:52:58 fluxgen Exp $
#ifndef TOOLBAR_HH
#define TOOLBAR_HH
@ -36,6 +36,7 @@
#include "XLayer.hh"
#include "XLayerItem.hh"
#include "LayerMenu.hh"
#include "Resource.hh"
#include <memory>
@ -201,7 +202,7 @@ private:
Strut *m_strut; ///< created and destroyed by BScreen
// resources
FbTk::Resource<bool> m_rc_auto_hide;
FbTk::Resource<bool> m_rc_auto_hide, m_rc_maximize_over;
FbTk::Resource<int> m_rc_width_percent;
FbTk::Resource<Fluxbox::Layer> m_rc_layernum;
FbTk::Resource<int> m_rc_on_head;