summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Configmenu.cc13
-rw-r--r--src/Theme.cc13
2 files changed, 17 insertions, 9 deletions
diff --git a/src/Configmenu.cc b/src/Configmenu.cc
index 04f7a78..2fed074 100644
--- a/src/Configmenu.cc
+++ b/src/Configmenu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Configmenu.cc,v 1.17 2002/10/15 09:49:51 fluxgen Exp $ 25// $Id: Configmenu.cc,v 1.18 2002/10/15 10:57:28 fluxgen Exp $
26 26
27#include "Configmenu.hh" 27#include "Configmenu.hh"
28 28
@@ -33,7 +33,7 @@
33#include "Tab.hh" 33#include "Tab.hh"
34 34
35enum {CMENU_USE_TABS=9, CMENU_USE_ICONS, CMENU_SLOPPY_WIN_GROUP, 35enum {CMENU_USE_TABS=9, CMENU_USE_ICONS, CMENU_SLOPPY_WIN_GROUP,
36 CMENU_DESKTOP_WHEELING, CMENU_WORKSPACE_WARPING, CMENU_TAB_ROTATE=21}; 36 CMENU_DESKTOP_WHEELING, CMENU_WORKSPACE_WARPING, CMENU_ANTIALIAS, CMENU_TAB_ROTATE=21};
37 37
38 38
39Configmenu::Configmenu(BScreen *scr) : Basemenu(scr), 39Configmenu::Configmenu(BScreen *scr) : Basemenu(scr),
@@ -92,6 +92,8 @@ m_tabmenu(scr) {
92 insert(i18n->getMessage( 92 insert(i18n->getMessage(
93 ConfigmenuSet, ConfigmenuDesktopWheeling, 93 ConfigmenuSet, ConfigmenuDesktopWheeling,
94 "Desktop MouseWheel Switching"), CMENU_DESKTOP_WHEELING); 94 "Desktop MouseWheel Switching"), CMENU_DESKTOP_WHEELING);
95 //TODO: really need i18n for this?
96 insert("Antialias", CMENU_ANTIALIAS);
95 97
96 update(); 98 update();
97 setItemSelected(8, screen()->doMaxOverSlit()); 99 setItemSelected(8, screen()->doMaxOverSlit());
@@ -106,6 +108,7 @@ m_tabmenu(scr) {
106 setItemSelected(CMENU_SLOPPY_WIN_GROUP, screen()->isSloppyWindowGrouping()); 108 setItemSelected(CMENU_SLOPPY_WIN_GROUP, screen()->isSloppyWindowGrouping());
107 setItemSelected(CMENU_WORKSPACE_WARPING, screen()->isWorkspaceWarping()); 109 setItemSelected(CMENU_WORKSPACE_WARPING, screen()->isWorkspaceWarping());
108 setItemSelected(CMENU_DESKTOP_WHEELING, screen()->isDesktopWheeling()); 110 setItemSelected(CMENU_DESKTOP_WHEELING, screen()->isDesktopWheeling());
111 setItemSelected(CMENU_ANTIALIAS, screen()->antialias());
109} 112}
110 113
111 114
@@ -194,7 +197,11 @@ void Configmenu::itemSelected(int button, unsigned int index) {
194 screen()->reconfigure(); 197 screen()->reconfigure();
195 } 198 }
196 break; 199 break;
197 200 case CMENU_ANTIALIAS:
201 // Note: no need to reconfigure here, screen reconfigures if antialias changes
202 screen()->setAntialias(!screen()->antialias());
203 setItemSelected(index, screen()->antialias());
204 break;
198 } 205 }
199 //save resources 206 //save resources
200 Fluxbox::instance()->save_rc(); 207 Fluxbox::instance()->save_rc();
diff --git a/src/Theme.cc b/src/Theme.cc
index 69f0963..be660d6 100644
--- a/src/Theme.cc
+++ b/src/Theme.cc
@@ -21,7 +21,7 @@
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22// DEALINGS IN THE SOFTWARE. 22// DEALINGS IN THE SOFTWARE.
23 23
24// $Id: Theme.cc,v 1.29 2002/10/13 22:32:49 fluxgen Exp $ 24// $Id: Theme.cc,v 1.30 2002/10/15 10:53:01 fluxgen Exp $
25 25
26#ifndef _GNU_SOURCE 26#ifndef _GNU_SOURCE
27#define _GNU_SOURCE 27#define _GNU_SOURCE
@@ -916,7 +916,7 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
916 } 916 }
917} 917}
918 918
919void Theme::reconfigure() { 919void Theme::reconfigure(bool antialias) {
920 920
921 XGCValues gcv; 921 XGCValues gcv;
922 unsigned long gc_value_mask = GCForeground; 922 unsigned long gc_value_mask = GCForeground;
@@ -966,14 +966,15 @@ void Theme::reconfigure() {
966 GCForeground, &gcv); 966 GCForeground, &gcv);
967 967
968 gcv.foreground = m_menustyle.t_text.pixel(); 968 gcv.foreground = m_menustyle.t_text.pixel();
969// if (m_menustyle.titlefont.fontStruct()) 969 if (m_menustyle.titlefont.isAntialias() != antialias)
970// gcv.font = m_menustyle.titlefont.fontStruct()->fid; 970 m_menustyle.titlefont.setAntialias(antialias);
971
971 XChangeGC(m_display, m_menustyle.t_text_gc, 972 XChangeGC(m_display, m_menustyle.t_text_gc,
972 gc_value_mask, &gcv); 973 gc_value_mask, &gcv);
973 974
974 gcv.foreground = m_menustyle.f_text.pixel(); 975 gcv.foreground = m_menustyle.f_text.pixel();
975// if (m_menustyle.framefont.fontStruct()) 976 if (m_menustyle.framefont.isAntialias() != antialias)
976// gcv.font = m_menustyle.framefont.fontStruct()->fid; 977 m_menustyle.framefont.setAntialias(antialias);
977 978
978 XChangeGC(m_display, m_menustyle.f_text_gc, 979 XChangeGC(m_display, m_menustyle.f_text_gc,
979 gc_value_mask, &gcv); 980 gc_value_mask, &gcv);