Changeset 6653 for geovis


Ignore:
Timestamp:
Dec 3, 2016 11:40:44 AM (8 years ago)
Author:
ldelgass
Message:

Use same label/box style for copyright,scale bar as coords readout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Renderer.cpp

    r6650 r6653  
    501501            new osgEarth::Util::Controls::HBox(osgEarth::Util::Controls::Control::ALIGN_RIGHT,
    502502                                               osgEarth::Util::Controls::Control::ALIGN_TOP,
    503                                                osgEarth::Util::Controls::Gutter(0, 2, 2, 0), 2.0f);
     503                                               osgEarth::Util::Controls::Gutter(2, 2, 2, 2), 2.0f);
    504504        _debugLabel =
    505505            new osgEarth::Util::Controls::LabelControl("Selection: None", 12.0f);
    506506        _debugLabel->setForeColor(osg::Vec4f(0, 0, 0, 1));
    507         //_debugLabel->setHaloColor(osg::Vec4f(1, 1, 1, 1));
    508507        _debugBox->addControl(_debugLabel.get());
    509508        _debugBox->setVertFill(true);
     
    517516        new osgEarth::Util::Controls::HBox(osgEarth::Util::Controls::Control::ALIGN_RIGHT,
    518517                                           osgEarth::Util::Controls::Control::ALIGN_BOTTOM,
    519                                            osgEarth::Util::Controls::Gutter(0, 2, 2, 0), 2.0f);
     518                                           osgEarth::Util::Controls::Gutter(2, 2, 2, 2), 2.0f);
    520519    _attribution = "Map data © OpenStreetMap";
    521520    _copyrightLabel =
    522521        new osgEarth::Util::Controls::LabelControl(_attribution, 12.0f);
    523     _copyrightLabel->setForeColor(osg::Vec4f(1, 1, 1, 1));
    524     _copyrightLabel->setHaloColor(osg::Vec4f(0, 0, 0, 1));
     522    _copyrightLabel->setForeColor(osg::Vec4f(0, 0, 0, 1));
    525523    _copyrightLabel->setEncoding(osgText::String::ENCODING_UTF8);
    526524    _scaleLabel =
    527525        new osgEarth::Util::Controls::LabelControl("- km", 12.0f);
    528     _scaleLabel->setForeColor(osg::Vec4f(1, 1, 1, 1));
    529     _scaleLabel->setHaloColor(osg::Vec4f(0, 0, 0, 1));
     526    _scaleLabel->setForeColor(osg::Vec4f(0, 0, 0, 1));
    530527    _scaleBar =
    531528        new osgEarth::Util::Controls::Frame();
     
    538535    _copyrightScaleBox->addControl(_scaleLabel.get());
    539536    _copyrightScaleBox->addControl(_scaleBar.get());
     537    _copyrightScaleBox->setVertFill(true);
     538    _copyrightScaleBox->setForeColor(osg::Vec4f(0, 0, 0, 1));
     539    _copyrightScaleBox->setBackColor(osg::Vec4f(1, 1, 1, 0.6));
    540540    osgEarth::Util::Controls::ControlCanvas::getOrCreate(_viewer.get())->addControl(_copyrightScaleBox.get());
    541541    // Install an event callback to handle scale bar updates
     
    677677            new osgEarth::Util::Controls::HBox(osgEarth::Util::Controls::Control::ALIGN_LEFT,
    678678                                               osgEarth::Util::Controls::Control::ALIGN_TOP,
    679                                                osgEarth::Util::Controls::Gutter(0, 2, 2, 0), 2.0f);
     679                                               osgEarth::Util::Controls::Gutter(2, 2, 2, 2), 2.0f);
    680680        _coordsBox->setVertFill(true);
    681681        _coordsBox->setForeColor(osg::Vec4f(0, 0, 0, 1));
Note: See TracChangeset for help on using the changeset viewer.