Skip to content

Commit d5f7bd9

Browse files
author
timlinux
committed
Set toolBox color (which contains legend) to window background color instead of white to make it blend in to the gui more.
git-svn-id: http://svn.osgeo.org/qgis/trunk@4956 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1d41bfd commit d5f7bd9

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/gui/qgisapp.cpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,18 @@ static void setTitleBarText_( QWidget & qgisApp )
319319

320320
// now build raster file filter
321321
QgsRasterLayer::buildSupportedRasterFileFilter( mRasterFileFilter );
322-
322+
323+
// Set the background colour for toolbox and overview as they default to
324+
// white instead of the window color
325+
QPalette myPalette = toolBox->palette();
326+
myPalette.setColor(QPalette::Button, myPalette.window().color());
327+
toolBox->setPalette(myPalette);
328+
//do the same for legend control
329+
myPalette = toolBox->palette();
330+
myPalette.setColor(QPalette::Button, myPalette.window().color());
331+
mMapLegend->setPalette(myPalette);
332+
//and for overview control this is done in createOverView method
333+
323334
// Do this last in the ctor to ensure that all members are instantiated properly
324335
setupConnections();
325336
//
@@ -1112,6 +1123,7 @@ void QgisApp::createOverview()
11121123
// overview canvas
11131124
QgsMapOverviewCanvas* overviewCanvas = new QgsMapOverviewCanvas(NULL, mMapCanvas);
11141125
QWhatsThis::add(overviewCanvas, tr("Map overview canvas. This canvas can be used to display a locator map that shows the current extent of the map canvas. The current extent is shown as a red rectangle. Any layer on the map can be added to the overview canvas."));
1126+
11151127
QBitmap overviewPanBmp(16, 16, pan_bits, true);
11161128
QBitmap overviewPanBmpMask(16, 16, pan_mask_bits, true);
11171129
mOverviewMapCursor = new QCursor(overviewPanBmp, overviewPanBmpMask, 5, 5);

0 commit comments

Comments
 (0)