How to removeunderline on hover in Submenu in Oracle ADF Alta theme - java

How to remove underline on hover in Submenu in Oracle ADF in Alta theme.
I have tried this ADF selector and CSS but it is not working:
af|commandMenuItem:hover {
text-decoration:none;
}
and
.AFMenuItem:alias {
text-decoration:none;
}
I have also added costume class but it not works. background-color style work but text-decoration not working.
Which selector I have to use to remove underline from hover submenu?
Thanks in advance.

Related

How to change popup menu color in material3

How can i change popup menu background color in material3. I have tried a lot but found no solutions. I had tried itemBacgroundColor also but it’s still in different color. I want it to white.
https://i.stack.imgur.com/gy1EQ.jpg
I don't sure about material, but you can change color of pop up menu like this:
add your style
<style name="popupMenuStyle" parent="Widget.AppCompat.PopupMenu">
<item name="android:background">#color/white</item>
</style>
and when you init popup menu
val cornerPopupWrapper =ContextThemeWrapper(requireContext(),R.style.popupMenuStyle)
val popupMenu = PopupMenu(cornerPopupWrapper, it, Gravity.NO_GRAVITY)

How to change color of selected RadioButton in JavaFX [CSS]?

I just want to change the color of the fill circle on a RadioButton. Surprisingly I couldn't find this in documentation. Is it possible?
I found this similar thread with a solution that is not working for me: CSS Change radio button color in JFXRadioButton
Here is how I have tried it (also tried other variations to no avail):
.radio-button .radio {
-fx-selected-color: yellow;
-fx-unselected-color: blue;
}
-jfx-selected-color and -jfx-unselected-color are not defined in JavaFX. They are attributes from JFoenix (docs). Also -fx-selected-color and -fx-unselected-color are not available in JavaFX.
To change the color of the dot in the RadioButton you can use the :selected pseudoclass like this (docs):
.radio-button:selected .radio .dot {
-fx-background-color: red;
-fx-background-insets: 0;
}
Additionally to the -fx-background-color you should set -fx-background-insets: 0;, because otherwise the dot is not exactly in the center anymore.
The result will look like this:

CSS Selector for 'default' button in a javafx Alert?

in javafx, does anyone know the css selector for the color of the "default" button in an alert? The "Yes" button in light blue here:
The base color for a default button is set to the looked-up color -fx-default-button:
.button:default {
-fx-base: -fx-default-button;
}
which defaults to the light blue in your screenshot:
.root {
/* ... */
-fx-default-button: #ABD8ED;
/* ... */
}
(Code snippets from modena.css source.)
So you can just change the value of -fx-default-button on your root element.

Eclipse RAP FormToolkit controls ignore CSS style

In my Eclipse RAP application I have a theme with declared CSS styles for controls Button, Combo ...
I have the following problem, creating controls (e.g. Button) with a FormToolkit the background and foreground color is ignored.
Normal Button:
new Button(parent, SWT.PUSH);
FormToolkit Button:
managedForm.getToolkit().createButton(parent, "search", SWT.PUSH);
This is the CSS that I use:
Button[PUSH] {
border: 1px solid #C5C5C5;
/* fancy test colors */
background-color: #0000ff;
color: #00ff00;
}
Normal Button
FormToolkit Button
This is especially bad because the hover effect is ignored as well. Is there a way to enforce the FormToolkit to also use the CSS styles?
I figured out a workaround, not the desired solution but works for now:
// hack to ensure CSS styles are used
toolkit.getColors().setBackground(null);
toolkit.getColors().setForeground(null);
If the colors are set to null, CSS style is used.

How to style Accelerator display text in JavaFX ContextMenu via CSS?

This CSS code changes the text color of the whole text of a MenuItem:
.context-menu .label {
-fx-text-fill: blue;
}
The thing is that I only want to change the Accelerator display text.
The CSS reference of JavaFX was not very helpful: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html#contextmenu
So how can you set the style of the Accelerator display text in a ContextMenu using CSS?
I inspected the skin and found out the accelerator-text class is assigned to the Label that displays the accelerator, which means you can use
.context-menu .accelerator-text {
-fx-text-fill: blue;
}
to style the Label displaying the accelerator.
I just gave a menuItem an id
fxml:
<MenuItem id="menuItem" mnemonicParsing="false" text="Close" accelerator="Shortcut+C"/>
and tried:
css:
#menuItem>Label {
-fx-background-color: #0093ff;
-fx-text-fill: #ffff00;
}
and it worked.

Categories

Resources