[GRASS-SVN] r34159 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 5 01:47:18 EST 2008


Author: martinl
Date: 2008-11-05 01:47:18 -0500 (Wed, 05 Nov 2008)
New Revision: 34159

Modified:
   grass/trunk/gui/wxpython/gui_modules/preferences.py
   grass/trunk/gui/wxpython/gui_modules/render.py
Log:
wxGUI: display background color (global)
(merge from devbr6, r34158)


Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-11-05 06:45:38 UTC (rev 34158)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-11-05 06:47:18 UTC (rev 34159)
@@ -100,6 +100,9 @@
                 'statusbarMode': {
                     'selection' : 0
                     },
+                'bgcolor': {
+                    'color' : (255, 255, 255, 255),
+                    }
                 },
             #
             # advanced
@@ -1013,6 +1016,25 @@
                       pos=(row, 1))
 
         #
+        # Background color
+        #
+        row += 1
+        gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
+                                         label=_("Background color:")),
+                      flag=wx.ALIGN_LEFT |
+                      wx.ALIGN_CENTER_VERTICAL,
+                      pos=(row, 0))
+        bgColor = csel.ColourSelect(parent=panel, id=wx.ID_ANY,
+                                    colour=self.settings.Get(group='display', key='bgcolor', subkey='color'),
+                                    size=(35, 35))
+        bgColor.SetName('GetColour')
+        self.winId['display:bgcolor:color'] = bgColor.GetId()
+        
+        gridSizer.Add(item=bgColor,
+                      flag=wx.ALIGN_RIGHT,
+                      pos=(row, 1))
+        
+        #
         # Use computation resolution
         #
         row += 1
@@ -1185,7 +1207,7 @@
         label = wx.StaticText(parent=panel, id=wx.ID_ANY, label="Color")
         hlColor = csel.ColourSelect(parent=panel, id=wx.ID_ANY,
                                     colour=self.settings.Get(group='atm', key='highlight', subkey='color'),
-                                    size=(25, 25))
+                                    size=(35, 35))
         hlColor.SetName('GetColour')
         self.winId['atm:highlight:color'] = hlColor.GetId()
 

Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py	2008-11-05 06:45:38 UTC (rev 34158)
+++ grass/trunk/gui/wxpython/gui_modules/render.py	2008-11-05 06:47:18 UTC (rev 34159)
@@ -896,11 +896,14 @@
             mapoutstr = self.mapfile.replace('\\', '/')
 
         # compose command
+        bgcolor = ':'.join(map(str, UserSettings.Get(group='display', key='bgcolor',
+                                                     subkey='color')))
+        
         complist = ["g.pnmcomp",
                     "in=%s" % ",".join(maps),
                     "mask=%s" % ",".join(masks),
                     "opacity=%s" % ",".join(opacities),
-                    "background=255:255:255",
+                    "background=%s" % bgcolor,
                     "width=%s" % str(self.width),
                     "height=%s" % str(self.height),
                     "output=%s" % self.mapfile]



More information about the grass-commit mailing list