Setting colors for the overflow menu - codenameone

I'm trying to set the colors of the menu items for the overflow menu. The unselected style works just fine, but the first item shows up pre-selected, which means I get white text with a white icon on a white background. I can make it legible by setting the text color to black, but I still lose the icon, and anyway, I don't want a white background. I'm setting these in the resource editor using the Command UIID, but it seems to be ignoring my settings for selected and/or pressed styles. Am I doing something wrong? Or is this a bug in the code? (I'm using a modified version of the Blue theme.)
In the illustration, I have set a padding of 1 mm top and bottom, and a margin of 0 all the way around.

Try setting the bgTransparency of the CommandFocus UIID to 0.

Related

materialDesign:BundledTheme Foreground remains black in dark theme

I am using the materialDesign:BundledTheme.
<materialDesign:BundledTheme
BaseTheme="Dark"
PrimaryColor="LightBlue"
SecondaryColor="Lime" />
The text in the ListViews turns from black to white when the theme switches from 'Light' to 'Dark'. The borders of my TextBoxes turns from black to white as well. The text inside of my TextBox remains black though. It is difficult to see the text due to this.
I have attempted to track down the Setter of the Foreground via the Live Visual Tree.
It says it comes from a BindingExpression. I looked online to see if I could find the source in a more definitive way. I came upon the 'DependencyPropertyHelper.GetValueSource' method. It says that the Foreground property is Inherited. I cannot figure out why this text remains black when it should turn white like the border does.

Why is the Designer in Codename one not reporting the attributes I set?

I started a Codename One project with the "Hello World bare bones". I used to define the styles in the Theme tab from the Designer but now it is becoming tedious.
Actually for some selectors, even if I override (unchecking the Derive box) some properties the style is not changed in the Designer (see below) or in the app itself.
However, in the list of selectors, the color is not the one I selected but the alignment seems to be it.
It seems that the theme is locked somewhere. Do I make a mistake, or should I set a constant to "unlock" the theme, or even should I clear some directories?
Please note that I am using NetBeans with designer V 1.1
.
Edit March 1st 2017
Following #Diamond's great tips, I was able to change the foreground color by setting the Border to empty (instead of NULL). However now the alignment is still not what I expect (see below). How can I do for this property ?
Any help appreciated,
In the Designer, Border is superior to background color and background image. Which means if the border image is set, a background color will have no effect unless the border is just a stroke or line.
Always solve this with these few steps:
Go to the Border tab and uncheck the override.
Click the ... button next to Border Help and a new Dialog will show.
Change the Type (First line) to Empty and click Ok.
Your background color will now have an effect.

Ellipse as mask for a label

I'm making a toggle button with a new design "material design" like. I have a problem with animation. I'm using an ellipse that expands and changes the color of the button where the mouse clicked. With color it works well but I want to make visible label as ellipse is over it and invisible the second one. I have an image to make it simplier to understand:
so the second image shows that where the green is it stills writes "Toggled" where it should already write "Untoggled" but still where blue color is, there should be writed "Toggled" then radialy changes. I have tried to use Opacity Mask but I couldn't get it to work. Anyone could help me?
Ok I did it animating EllipseGeometry, settings the label I want to display on top of the old one and clipping the top one to the EllipseGeometry.

Dark Background of new WPF Ribbon becomes gradient?

I am using the new Version of MS WPF Ribbon (Version MS WPF Ribbon 3.5.40729.1) with Windows 7 and I am trying to change the Background of the Ribbon. Everything looks fine if I use light background colors.
But e.g. if I choose "Black" a white gradient is shown with the black. It does not seem to be possible to remove the white and simply have a black background. And it looks ugly, especially when every Textcolor normally is white. (Tabheaders get white background and are not readable anymore)
In the samples, (I leave everything as is) if I set Background=Black directly in the ribbon's property, the effect is the same.
What do I have to set or do to get rid of the white gradient color?
There's a hard-coded gloss effect in the RibbonGroup template. It's lame, but the only way to get rid of it is to override the temlate for RibbonGroup. If you have Blend, just extract the template and rip out the offending LinearGradientBrush.

WPF: Changing the look of a Surface Listbox "click-effect"

I'm changing the look of some Controls that I use in my Microsoft Surface Application at the moment. And today I'm working on a SurfaceListBox.
I have the template for it and already changed background and borders and other stuff.
But I really cannot find where I can change the color of the rectangle that appears on the ListBoxItem when you touch the ListBox. At the moment it's just white and I want to change that.
It's not something like the effect that you can see when the item is selected. I already found that and changed that so my selected item now appears in a different color. But the effect in the second when you touch the item stays white.
So where can I change this effect?
If you mean the bright, white highlight that happens when you press your finger against an item you should look into the SurfaceShadowChrome. It's used by (almost) all surface controls to give feedback when the user is pressing on a control.
It does have a Color property that you can modify to suit your needs. Apart from the color, and the tweaking of corner radius and shadow offset, it's not a very flexible decorator. But hopefully, you'll be able to make it do what you need.

Resources