diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-24 14:59:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-24 16:45:40 +0100 |
commit | 7deac4656c53965125c9ec1ca6eb8fcc8d393afa (patch) | |
tree | 1ad5ce971cf3da22fcec786294d37e591c13029f /vcl/source/outdev/nativecontrols.cxx | |
parent | beb2b25c97bbbe37309a6186269b30be7b0d7a6f (diff) |
gtk3: get the right height for Edit boxes
smuggle the text height down to the native region calculation code instead of
messing around with proxies
Change-Id: I727ceddb5b431be82e6e5a725f9bca588e5b2046
Diffstat (limited to 'vcl/source/outdev/nativecontrols.cxx')
-rw-r--r-- | vcl/source/outdev/nativecontrols.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index bfb0447a1953..7a8e70ffc1b3 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -247,9 +247,6 @@ static std::shared_ptr< ImplControlValue > TransformControlValue( const ImplCont aResult.reset( pNew ); } break; - case CTRL_GENERIC: - aResult.reset( new ImplControlValue( rVal ) ); - break; case CTRL_MENU_POPUP: { const MenupopupValue* pMVal = static_cast<const MenupopupValue*>(&rVal); @@ -258,6 +255,16 @@ static std::shared_ptr< ImplControlValue > TransformControlValue( const ImplCont aResult.reset( pNew ); } break; + case CTRL_EDITBOX: + { + auto nTextHeight = rDev.ImplLogicToDevicePixel(Rectangle(0, 0, 0, rVal.getNumericVal())).GetHeight(); + EditBoxValue* pNew = new EditBoxValue(nTextHeight); + aResult.reset(pNew); + } + break; + case CTRL_GENERIC: + aResult.reset( new ImplControlValue( rVal ) ); + break; default: OSL_FAIL( "unknown ImplControlValue type !" ); break; |