View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005869 | JEDI VCL | 00 JVCL Components | public | 2012-04-25 15:18 | 2012-09-10 14:15 |
Reporter | boerema1 | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | |||||
Target Version | Fixed in Version | 3.46 | |||
Summary | 0005869: JvOfficeColorPanel: the default hint for the custom color button is not given a pretty name | ||||
Description | The custom color button showing the custom user selected color is by default given the value clDefault. For the hint this value is not translated to a "pretty name" but left as is in contrary to all the other color buttons. For end users it should show Default as they won't understand why the clDefault. We also can't change the value of this hint (this is not Properties.CustomColorHint but the button to the right of that, see image). Solution would be for FCustomColorDrawer.Hint to call ColorToPrettyName and update that to also handle clDefault and adding a resourcestring for that. | ||||
Tags | No tags attached. | ||||
2012-04-25 15:18
|
|
|
I made a diff file with the proposed changes, see attachment. |
2012-04-25 16:21
|
clDefault.diff (2,014 bytes)
Index: JvResources.pas =================================================================== --- JvResources.pas (revision 13287) +++ JvResources.pas (working copy) @@ -2204,6 +2204,9 @@ RsMenuBar ='Menu Bar'; RsMenuHighlight ='Menu Highlight'; + // clNone and clDefault + RsClNone = 'None'; + RsClDefault = 'Default'; //=== JvUrlGrabbers.pas ====================================================== resourcestring Index: JvOfficeColorPanel.pas =================================================================== --- JvOfficeColorPanel.pas (revision 13287) +++ JvOfficeColorPanel.pas (working copy) @@ -1337,7 +1337,7 @@ Tag := FButtonCustomColor.Tag + 1; Flat := True; DrawColor := clDefault; - Hint := ColorToString(DrawColor); + Hint := ColorToPrettyName(DrawColor); CanDrawColorQuad := True; CanDrawGlyph := False; CanDrawInnerFrame := False; Index: JvJCLUtils.pas =================================================================== --- JvJCLUtils.pas (revision 13287) +++ JvJCLUtils.pas (working copy) @@ -8543,6 +8543,12 @@ Result := SysColorValues[Index].Description; Exit; end; + for Index := Low(MiscColorValues) to High(MiscColorValues) do + if Value = MiscColorValues[Index].Value then + begin + Result := MiscColorValues[Index].Description; + Exit; + end; Result := ColorToString(Value); end; Index: JvTypes.pas =================================================================== --- JvTypes.pas (revision 13287) +++ JvTypes.pas (working copy) @@ -485,6 +485,11 @@ (Value: clMenuHighlight; Constant: 'clMenuHighlight'; Description: RsMenuHighlight) ); + MiscColorValues: array [0 .. 1] of TDefColorItem = ( + (Value: clNone; Constant: 'clNone'; Description: RsClNone), + (Value: clDefault; Constant: 'clDefault'; Description: RsClDefault) + ); + type TJvCustomThread = class(TThread) private |
|
Please use the latest SVN version and provide the zipped sources of a sample application showing this. |
|
It seems that the proposed changes in the supplied diff file were already added to the latest svn version so I'm guessing that a sample application is not needed anymore, thanks. |
|
Thanks for letting us know |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-25 15:18 | boerema1 | New Issue | |
2012-04-25 15:18 | boerema1 | File Added: clDefault.png | |
2012-04-25 16:20 | boerema1 | Note Added: 0019721 | |
2012-04-25 16:21 | boerema1 | File Added: clDefault.diff | |
2012-06-11 17:31 | obones | Note Added: 0019862 | |
2012-06-11 17:31 | obones | Status | new => feedback |
2012-06-15 14:15 | boerema1 | Note Added: 0020003 | |
2012-06-18 11:24 | obones | Note Added: 0020010 | |
2012-06-18 11:24 | obones | Status | feedback => resolved |
2012-06-18 11:24 | obones | Fixed in Version | => Daily / SVN |
2012-06-18 11:24 | obones | Resolution | open => no change required |
2012-06-18 11:24 | obones | Assigned To | => obones |
2012-09-10 14:15 | obones | Fixed in Version | Daily / SVN => 3.46 |