From 72e9b65bc069b9ce16343325bb2844106d0a2f89 Mon Sep 17 00:00:00 2001 From: rkv Date: Thu, 9 Jan 2014 13:05:57 +0000 Subject: [PATCH] Fix for the bug #318: Different styles in folders' design in Object browser. --- src/HYDROGUI/HYDROGUI_DataObject.cxx | 15 ++++++++++++++- src/HYDROGUI/HYDROGUI_DataObject.h | 5 +++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/HYDROGUI/HYDROGUI_DataObject.cxx b/src/HYDROGUI/HYDROGUI_DataObject.cxx index cc62a54a..a259a866 100644 --- a/src/HYDROGUI/HYDROGUI_DataObject.cxx +++ b/src/HYDROGUI/HYDROGUI_DataObject.cxx @@ -244,7 +244,7 @@ QString HYDROGUI_NamedObject::entry() const QString HYDROGUI_NamedObject::name() const { - return myName; + return myName.toUpper(); } QPixmap HYDROGUI_NamedObject::icon( const int theId ) const @@ -257,6 +257,19 @@ QPixmap HYDROGUI_NamedObject::icon( const int theId ) const return LightApp_DataObject::icon( theId ); } +QFont HYDROGUI_NamedObject::font( const int theId ) const +{ + QFont aFont = LightApp_DataObject::font( theId ); + if( theId == NameId ) + { + if ( dynamic_cast( parent() ) ) + { + aFont.setBold( true ); + } + } + return aFont; +} + HYDROGUI_DropTargetObject::HYDROGUI_DropTargetObject( SUIT_DataObject* theParent, const QString& theName, const QString& theParentEntry, diff --git a/src/HYDROGUI/HYDROGUI_DataObject.h b/src/HYDROGUI/HYDROGUI_DataObject.h index 8f158288..6ffeaa1e 100644 --- a/src/HYDROGUI/HYDROGUI_DataObject.h +++ b/src/HYDROGUI/HYDROGUI_DataObject.h @@ -182,6 +182,11 @@ public: */ virtual QString name() const; + /** + * Returns the font of displayed object name. + */ + virtual QFont font( const int = SUIT_DataObject::NameId ) const; + /** * Returns the object icon. */ -- 2.39.2