Community
Participate
Working Groups
Steps to repeat: open diagram, open Rulers and Grid page of its properties, set some color, open "custom color" dialog - selected color is always black it would be a good thing, if this dialog opened with currently selected color
This is applicable for all the property sections allowing to change color. Since generated code just using runtime classes to contribute corresponding property sections, redirecting this request to the runtime team.
I have come up with a possible solution but I have a minor problem with the 3rd scenario. We currently have 3 scenarios. 1) In the situation where a "normal" color is being selected (e.g blue), when opening up the palette, and clicking "custom colors", the dialog will be opened up automatically selected to blue, that's because blue exists. No problem 2) If a "custom color" was chosen where you elected to "add to custom colors", in the section near the bottom of the dialog, the dialog would also open up with that color selected as default. No problem 3) Choose your custom color, but don't add this custom color to the bottom of the dialog. you use the color and later on when you open up the palette, since the color does not exist on this palette, the default color, black will be chosen. however if you open up the "define custom colors" palette, the specifics of the color are still preserved in terms of usability I think this is fine, because automatically adding the custom color would render the "add custom color" action useless. There are 16 slots for the user to define custom colors, and how he/she deals with adding them should also be their concern. Therefore, I think defaulting the selection to black would be appropriate under the 3rd scenario. Let me know what you think before I post the proposed fix.
(In reply to comment #2) Looks reasonable for me. Can we select corresponding color on the "rainbow" if user pressed "Define custom colors" button in 3)?
(In reply to comment #3) > (In reply to comment #2) > Looks reasonable for me. Can we select corresponding color on the "rainbow" if > user pressed "Define custom colors" button in 3)? yes you can, i should have said this earlier, but basically the behaviour of this palette is using the color palette in windows paint as a standard (open paint, color tab, more colors)
Created attachment 82101 [details] Proposed Patch The proposed patch includes a number of fixes. #1) Sets the last color used as the initial color selected for the windows color palette. This involves the fontColor, lineColor, and fillColor on the toolbar. The fix occurs in ColorPropertyContributionItem.java. #2) Same as above except instead of the toolbar, the fix is in the appearance properties view. (i.e ColorsAndFontsPropertySection.java) #3) Same as problem #1, except instead of the toolbar, the fix is in the Rulers&Grid section, in specific, the grid line color. (i.e RulerGridPropertySection.java) #4) Fixed the overlay image on the grid line color. Now you can see what color you selected by simply looking at the icon. (the overlay image is that thin strip of color below the brush) Note: I have moved the static class ColorOverlayImageDescriptor out of ColorsAndFontsPropertySection and placed the class in the package "org.eclipse.gmf.runtime.diagram.ui.properties.internal". This was done since the apperance and the gridline property section both use this class. Also this way, future proprety sections can also use this class.
Created attachment 82128 [details] Proposed patch updated Minor fixes from the patch proposed before. 1) the dispose method in RulerGridPropertySection was changed to private 2) the ColorOverlayImageDescriptor static class was put back into ColorsAndFontPropertySection and the RulerGridPropertySection because the original class was protected and placed in the ColorsAndFontPropertySection.
Contributed Carson's patch.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug