all repos — fluxbox @ 7c43812c04447a81b42f1da9120d825fb86a0f32

custom fork of the fluxbox windowmanager

antialias option
fluxgen fluxgen
commit

7c43812c04447a81b42f1da9120d825fb86a0f32

parent

4acb333856c159ffcf1b252930e944ca6b8083bb

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

jump to
M src/Configmenu.ccsrc/Configmenu.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: Configmenu.cc,v 1.17 2002/10/15 09:49:51 fluxgen Exp $ +// $Id: Configmenu.cc,v 1.18 2002/10/15 10:57:28 fluxgen Exp $ #include "Configmenu.hh"

@@ -33,7 +33,7 @@ #include "Screen.hh"

#include "Tab.hh" enum {CMENU_USE_TABS=9, CMENU_USE_ICONS, CMENU_SLOPPY_WIN_GROUP, - CMENU_DESKTOP_WHEELING, CMENU_WORKSPACE_WARPING, CMENU_TAB_ROTATE=21}; + CMENU_DESKTOP_WHEELING, CMENU_WORKSPACE_WARPING, CMENU_ANTIALIAS, CMENU_TAB_ROTATE=21}; Configmenu::Configmenu(BScreen *scr) : Basemenu(scr),

@@ -92,6 +92,8 @@ "Workspace Warping"), CMENU_WORKSPACE_WARPING);

insert(i18n->getMessage( ConfigmenuSet, ConfigmenuDesktopWheeling, "Desktop MouseWheel Switching"), CMENU_DESKTOP_WHEELING); + //TODO: really need i18n for this? + insert("Antialias", CMENU_ANTIALIAS); update(); setItemSelected(8, screen()->doMaxOverSlit());

@@ -106,6 +108,7 @@ setItemSelected(CMENU_USE_ICONS, Fluxbox::instance()->useIconBar());

setItemSelected(CMENU_SLOPPY_WIN_GROUP, screen()->isSloppyWindowGrouping()); setItemSelected(CMENU_WORKSPACE_WARPING, screen()->isWorkspaceWarping()); setItemSelected(CMENU_DESKTOP_WHEELING, screen()->isDesktopWheeling()); + setItemSelected(CMENU_ANTIALIAS, screen()->antialias()); }

@@ -194,7 +197,11 @@ setItemSelected(index, screen()->isDesktopWheeling());

screen()->reconfigure(); } break; - + case CMENU_ANTIALIAS: + // Note: no need to reconfigure here, screen reconfigures if antialias changes + screen()->setAntialias(!screen()->antialias()); + setItemSelected(index, screen()->antialias()); + break; } //save resources Fluxbox::instance()->save_rc();
M src/Theme.ccsrc/Theme.cc

@@ -21,7 +21,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: Theme.cc,v 1.29 2002/10/13 22:32:49 fluxgen Exp $ +// $Id: Theme.cc,v 1.30 2002/10/15 10:53:01 fluxgen Exp $ #ifndef _GNU_SOURCE #define _GNU_SOURCE

@@ -916,7 +916,7 @@ }

} } -void Theme::reconfigure() { +void Theme::reconfigure(bool antialias) { XGCValues gcv; unsigned long gc_value_mask = GCForeground;

@@ -966,14 +966,15 @@ XChangeGC(m_display, m_windowstyle.b_pic_unfocus_gc,

GCForeground, &gcv); gcv.foreground = m_menustyle.t_text.pixel(); -// if (m_menustyle.titlefont.fontStruct()) -// gcv.font = m_menustyle.titlefont.fontStruct()->fid; + if (m_menustyle.titlefont.isAntialias() != antialias) + m_menustyle.titlefont.setAntialias(antialias); + XChangeGC(m_display, m_menustyle.t_text_gc, gc_value_mask, &gcv); gcv.foreground = m_menustyle.f_text.pixel(); -// if (m_menustyle.framefont.fontStruct()) -// gcv.font = m_menustyle.framefont.fontStruct()->fid; + if (m_menustyle.framefont.isAntialias() != antialias) + m_menustyle.framefont.setAntialias(antialias); XChangeGC(m_display, m_menustyle.f_text_gc, gc_value_mask, &gcv);