Skip to content


Set toolBox color (which contains legend) to window background color …
Browse files Browse the repository at this point in the history
…instead of white to make it blend in to the gui more.

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 3, 2006
1 parent f8a51ef commit 14df914
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/gui/qgisapp.cpp
Expand Up @@ -319,7 +319,18 @@ static void setTitleBarText_( QWidget & qgisApp )

// now build raster file filter
QgsRasterLayer::buildSupportedRasterFileFilter( mRasterFileFilter );

// Set the background colour for toolbox and overview as they default to
// white instead of the window color
QPalette myPalette = toolBox->palette();
myPalette.setColor(QPalette::Button, myPalette.window().color());
//do the same for legend control
myPalette = toolBox->palette();
myPalette.setColor(QPalette::Button, myPalette.window().color());
//and for overview control this is done in createOverView method

// Do this last in the ctor to ensure that all members are instantiated properly
Expand Down Expand Up @@ -1112,6 +1123,7 @@ void QgisApp::createOverview()
// overview canvas
QgsMapOverviewCanvas* overviewCanvas = new QgsMapOverviewCanvas(NULL, mMapCanvas);
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."));

QBitmap overviewPanBmp(16, 16, pan_bits, true);
QBitmap overviewPanBmpMask(16, 16, pan_mask_bits, true);
mOverviewMapCursor = new QCursor(overviewPanBmp, overviewPanBmpMask, 5, 5);
Expand Down

0 comments on commit 14df914

Please sign in to comment.