Skip to content

Commit 5d07251

Browse files
author
rblazek
committed
smaller minimum sizes
git-svn-id: http://svn.osgeo.org/qgis/trunk@4985 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent fa02467 commit 5d07251

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/gui/qgisapp.cpp

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,17 @@ void QgisApp::createStatusBar()
865865
statusBar()->setFont(myFont);
866866
mScaleLabel = new QLabel(QString("Scale"),statusBar());
867867
mScaleLabel->setFont(myFont);
868-
mScaleLabel->setMinimumWidth(100);
868+
mScaleLabel->setMinimumWidth(10);
869+
mScaleLabel->setMargin(3);
870+
mScaleLabel->setAlignment(Qt::AlignCenter);
869871
QWhatsThis::add(mScaleLabel, tr("Displays the current map scale"));
870872
statusBar()->addWidget(mScaleLabel, 0,true);
871873
//coords status bar widget
872874
mCoordsLabel = new QLabel(QString("Coordinates:"), statusBar());
873-
mCoordsLabel->setMinimumWidth(200);
875+
mCoordsLabel->setMinimumWidth(10);
874876
mCoordsLabel->setFont(myFont);
877+
mCoordsLabel->setMargin(3);
878+
mCoordsLabel->setAlignment(Qt::AlignCenter);
875879
QWhatsThis::add(mCoordsLabel, tr("Shows the map coordinates at the current cursor postion. The display is continuously updated as the mouse is moved."));
876880
statusBar()->addWidget(mCoordsLabel, 0, true);
877881
// render suppression status bar widget
@@ -1108,7 +1112,7 @@ void QgisApp::createCanvas()
11081112
int myBlue = mySettings.value("/qgis/default_canvas_color_blue",255).toInt();
11091113
mMapCanvas->setCanvasColor(QColor(myRed,myGreen,myBlue)); // this is the fill co;our when rendering
11101114

1111-
mMapCanvas->setMinimumWidth(400);
1115+
mMapCanvas->setMinimumWidth(10);
11121116
QVBoxLayout *myCanvasLayout = new QVBoxLayout;
11131117
myCanvasLayout->addWidget(mMapCanvas);
11141118
tabWidget->widget(0)->setLayout(myCanvasLayout);
@@ -3413,18 +3417,24 @@ void QgisApp::measureArea()
34133417
}
34143418

34153419

3420+
34163421
void QgisApp::attributeTable()
34173422
{
3423+
std::cerr << ">> = " << std::endl;
34183424
QgsMapLayer *layer = mMapLegend->currentLayer();
3425+
std::cerr << ">> = " << std::endl;
34193426
if (layer)
34203427
{
3428+
std::cerr << ">>> = " << std::endl;
34213429
layer->table();
3430+
std::cerr << ">>> = " << std::endl;
34223431
}
34233432
else
34243433
{
34253434
QMessageBox::information(this, tr("No Layer Selected"),
34263435
tr("To open an attribute table, you must select a layer in the legend"));
34273436
}
3437+
std::cerr << ">> = " << std::endl;
34283438
}
34293439

34303440
void QgisApp::deleteSelected()
@@ -3608,11 +3618,21 @@ void QgisApp::refreshMapCanvas()
36083618
void QgisApp::showMouseCoordinate(QgsPoint & p)
36093619
{
36103620
mCoordsLabel->setText(p.stringRep(mMousePrecisionDecimalPlaces));
3621+
// Set minimum necessary width
3622+
if ( mCoordsLabel->width() > mCoordsLabel->minimumWidth() )
3623+
{
3624+
mCoordsLabel->setMinimumWidth(mCoordsLabel->width());
3625+
}
36113626
}
36123627

36133628
void QgisApp::showScale(QString theScale)
36143629
{
36153630
mScaleLabel->setText(theScale);
3631+
// Set minimum necessary width
3632+
if ( mScaleLabel->width() > mScaleLabel->minimumWidth() )
3633+
{
3634+
mScaleLabel->setMinimumWidth(mScaleLabel->width());
3635+
}
36163636
}
36173637

36183638
void QgisApp::testButton()

0 commit comments

Comments
 (0)