diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-31 14:53:25 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-31 14:53:25 -0500 |
commit | f16f8eb6bf27ae9dcebbcac7db0a5dbe673a27c5 (patch) | |
tree | 33493803b3ee7ed21af80bd3997e49d0beb604f1 /styles/dotnet/dotnet.cpp | |
parent | c8898cf01f664fc323aa0bb46317bfb8b9dd22f5 (diff) | |
download | tdeartwork-f16f8eb6bf27ae9dcebbcac7db0a5dbe673a27c5.tar.gz tdeartwork-f16f8eb6bf27ae9dcebbcac7db0a5dbe673a27c5.zip |
Update styles for new API
Diffstat (limited to 'styles/dotnet/dotnet.cpp')
-rw-r--r-- | styles/dotnet/dotnet.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/styles/dotnet/dotnet.cpp b/styles/dotnet/dotnet.cpp index 9ab1d92d..e73d40d8 100644 --- a/styles/dotnet/dotnet.cpp +++ b/styles/dotnet/dotnet.cpp @@ -711,7 +711,7 @@ void dotNETstyle::drawPrimitive(TQ_PrimitiveElement pe, else cflags |= Style_On; - TQRect rr = TQRect( x + 6, y + 6, 16, h - 6 ); + TQRect rr = TQRect( x + 4, y + 2, 16, h - 2 ); if (TQApplication::reverseLayout()) rr = visualRect( rr, r ); @@ -1390,7 +1390,7 @@ void dotNETstyle::drawControl(TQ_ControlElement element, if (checkable) { if (mi->isChecked()) { - drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(x, y, checkcol, h), cg, flags); + drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, r, cg, flags, opt); } } @@ -1906,6 +1906,15 @@ int dotNETstyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, Co return 1; } + case PM_MenuIndicatorFrameHBorder: + return 4; + case PM_MenuIndicatorFrameVBorder: + return 2; + case PM_MenuIconIndicatorFrameHBorder: + return 4; + case PM_MenuIconIndicatorFrameVBorder: + return 2; + default: return KStyle::pixelMetric(m, ceData, elementFlags, widget); } @@ -2108,4 +2117,22 @@ bool dotNETstyle::objectEventHandler( TQStyleControlElementData ceData, ControlE return false; } +int dotNETstyle::styleHint(StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &opt, TQStyleHintReturn *returnData, const TQWidget *w) const +{ + int ret; + + switch (sh) { + case SH_MenuIndicatorColumnWidth: + { + ret = TQMAX(opt.maxIconWidth(), 26); + } + break; + default: + ret = TQCommonStyle::styleHint(sh, ceData, elementFlags, opt, returnData, w); + break; + } + + return ret; +} + // vim: noet ts=4 sw=4 |