Change "opacity" of ScrollPanel in GWT to "1" - gwt

I'm using a datagrid with its default scrollPanel which set "opacity" to "0.7".
I want to change the opacity to "1" but the ScrollPanel is just created by some "div", not using "CSS" resources.
So, I could not override any CSS resource also CSS attribute.
Please suggest me how to change the "opacity".
Thanks!

Even though it its setting in some div element you can set the opacity in css... In your css type the following
.gwt-scrollpanel {
Opacity : 1.0 !important;
}

Related

How disable this line on Mui X DataGrid?

this line!
i try to override css class by
.MuiDivider-root{ display: none }
it not working
Seems like it's a bottom border which comes from .MuiDataGrid-cell. Just set it to none.

How to zoom a GtkTreeView

I want to zoom a GtkTreeView. Initially I thought I simply could use transform to do that, but it seems like GTK CSS currently does not support transform.
So reading up on the CSS docs, it seems my only chance would be to set font-size.
Now naively I tried to set font-size to 200% in GtkStyleContext.
All I get then is
g_object_set_is_valid_property: object class 'GtkStyleContext' has no property named 'font-size'
So how is one supposed to set font-size in code?
You can start with this:
css_provider = Gtk.CssProvider()
css = b"""treeview.view {font-size: 200%;}"""
css_provider.load_from_data(css)
style_context.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
But, this will set 200% to all treeviews.
If you want (and you probably do) a custom style class which you can attach to any widget, it should look something like
.my_style_class { font-size: 200%; }
And you add this class to specific widget's StyleContext:
widget.get_style_context().add_class("my_style_class")

core-list must either be sized or be inside an overflow:auto div that is sized

I'm using the Polymer core-list in a page and the display provides a good result, but when I try to use this file as a Polymer custom element, it shows me this error : core-list must either be sized or be inside an overflow:auto div that is sized.
How to resolve this problem please ?
Because your question doesn't provide much information just a guess. You are missing
<polymer-element name="xxx">
<style>
:host {
display: block;
}
</style>
<core-list-dart>
...
</polymer-element>
From the core-list documentation:
IMPORTANT: core-list must ether be explicitly sized, or delegate
scrolling to an explicitly sized parent. By "explicitly sized", we
mean it either has an explicit CSS height property set via a class or
inline style, or else is sized by other layout means (e.g. flex or
fit). Alternatively, core-list can delegate scrolling to a scrollable
element that contains the list by setting the scrollTarget property,
and the same explicit sizing requiremets will apply to that element.
You should be good to go, if you set a height property for your element.
<polymer-element name="somename">
<style>
:host {
display: block;
}
.someclass {
height:10vh;
}
</style>
<core-list-something class="someclass">
...
</polymer-element>

Twitter Bootstrap - Dropdown height too small

I am using bootstrap in an Ruby on Rails app. I use Firefox. I find that the height of the dropdown field (select tag) is too small.However the height of the text fields are appropriate. I had too add the below code to application.css to fix it:
select {
height: 38px !important;
}
Now dropdown shows its content properly though its overall height (box) is a bit bigger that text fields. Is there a neater way to fix the issue?
I found it more appropriate to remove styling from application.scss and modify the app/assets/stylesheets/custom.css.scss instead. custom.css.scss is generated by Bootstrap. The padding for all FORM elements was set to 10px in that file. I set padding for SELECT element to 2px and left the rest intact.

Modify a css animation property?

Is there a way to programatically define and start a css animation? I'd like to animate a div from one absolute position to another. Something like:
FlowPanel fp = new FlowPanel();
fp.getElement().getStyle().setPosition(Position.ABSOLUTE);
fp.getElement().getStyle().setLeft(50, Style.Unit.PX);
fp.getElement().getStyle().setTop(50, Style.Unit.PX);
...
// something like:
fp.setAnimation("top: 300px");
I saw that we could define a css animation in our css file, and changing the name of the div's style will trigger the animation. But I don't know if we can programatically modify an animation defined in css. For example:
// css file
.testAnimation {
top: 500px;
transition-property: top;
transition-duration: 1s;
}
...
// But we can't modify the "top" attribute here depending on runtime needs?:
fp.setStyleName("testAnimation"); // I may want "top" to be some other value here.
Thanks
You have several approaches
1) GWT Animation - http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwAnimation
2) Jquery Approach - via GWTQuery - https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/6kOSm0HBP4A
3) JSNI In GWT - How to add CSS AnimationEnd event handler to GWT widget?
You can use getElement().getStyle().setProperty( property, value ) to set any css property. But this is not the right way of doing it. Suggested way is to do via css.
This Link might help you