In a Gtk application, I have that line height:
and I want this line height:
Note that this is the same font size.
Is it possible to achieve this line height / padding using gtkrc? How?
Any hint will be appreciated.
fbmd
Add to gtkrc:
style "tree" {
GtkTreeView::vertical-separator = 8
}
class "GtkTreeView" style "tree"
Related
My first question ever - so apologies if I am not specific enough.
How do I change the color and width of material drawer component in angular-dart in css? I have tried it several ways in the CSS, including as below:
::ng-deep material-drawer {
color: #9437FF;
width: 200px;
}
.material-drawer {
color: #9437FF;
width: 200px;
}
FYI, the following worked with the material-header, which is inside a header tag:
::ng-deep header.material-header.material-header {
background-color: white;
color: #9437FF;
}
My material-drawer is not in a div or anything, just directly an HTML element on its own.
Any pointers are appreciated!
Setting the width of the drawer is a bit complicated. It involves setting a good amount of values as such it is best to use the mixin. You can see an example here
As for the color that is a little bit harder. What color are you trying to change? The background color?
For the background color you can set the background-color on the drawer. The problem is going to be that the content itself is going to override that color. In this case the material-list has it's own white color associated with it. Removing that color you could have problems with the divider colors.
I am working on a codename one application. I need to remove the border for Accordion component. (or) Is there anyway to change the Accordion's border color..
Can someone guide me...
The black border shown in the image
In your theme.res, just add a UIID with no border and set this UIID for accordeon.Otherwise , you can override accordeon UIID and set empty border like this :
And then uncheck derive and select border "empty"
To remove(hide) the border of an accordion from the code you can define it's border colour to be the same as the background colour and to be as narrow as possible.
Border border = Border.createCompoundBorder(Border.createLineBorder(1, 0xffffff), Border.createLineBorder(1, 0xffffff), Border.createLineBorder(1, 0xffffff), Border.createLineBorder(1, 0xffffff));
my_accordion = new Accordion(ifont_keyboard_right, ifont_keyboard_down);
my_accordion.getAllStyles().setBgColor(0xffffff);
my_accordion.getAllStyles().setBgTransparency(255);
my_accordion.getAllStyles().setPadding(0, 0, 0, 0);
my_accordion.getAllStyles().setMargin(0, 0, 0, 0);
my_accordion.getAllStyles().setBorder(border);
I've made a MultiBarChart with NVD3.
It works, however, a colleague said I needed more space between each Australian state.
So, Tasmania further from Victoria etc.
Here is the data visualisation
I can not find a forum that explains this in non-developer language. I'm not a developer, but having a go.
Here is my code...
var chart;
nv.addGraph(function() {
chart = nv.models.multiBarHorizontalChart()
.x(function(d) { return d.label })
.y(function(d) { return d.value })
.margin({top: 30, right: 105, bottom: 30, left: 103})
.tooltips(true)
.showControls(false);
chart.yAxis
.tickFormat(d3.format(',.1f'));
d3.select('#chart1 svg')
.datum(long_short_data)
.transition().duration(1400)
.call(chart);
nv.utils.windowResize(chart.update);
chart.dispatch.on('stateChange', function(e) { nv.log('New State:', JSON.stringify(e)); });
return chart;
});
Thanks you super kind and smart people!
No Need to use too much code for spacing just use below code :
var chart = nv.models.multiBarChart();
//added by santoshk for fix the width issue of the chart
chart.groupSpacing(0.8);//you can any value instead of 0.8
This is unfortunately something you can't configure in NVD3. However, you can change the height of the bars after the chart has been created to make it appear as if there's more space between them. The code to do this is simple:
d3.selectAll(".nv-bar > rect").attr("height", chart.xAxis.rangeBand()/3);
The default height is chart.xAxis.rangeBand()/2 -- you can adjust this as you see fit. The only thing to keep in mind when running this code is that NVD3 animates its elements, so not everything will be there in the beginning or values may be overwritten. You can solve this by waiting a small amount of time before calling that code using setTimeout:
setTimeout(function() {
d3.selectAll(".nv-bar > rect").attr("height", chart.xAxis.rangeBand()/3);
}, 100);
Just found this question while searching for a way to add more space between bars. Like Lars said, you can change the bar size after the chart has been drawn. However, when you increase the bar height without changing the space between each bar, it overflows. To add space between the bars you should use xRange:
var chart = nv.models.multiBarHorizontalChart().xRange([0, 125])
Just noticed that the pie-chart that is displayed is not utilizing the full width and height of the container.
I can see some blank spaces. Attached image below.
I have drawn borders to the div. And it is clear that the pie isn't utilizing the full width and height.
How do i get this thing fixed?
Any help would be appreciated.
Thanks in advance.
It looks like the default piechart renderer has a padding of 20px. Reduce it as you see fit by adjusting the padding such as:
jQuery("#'. $id .'").jqplot([your data here],
{
seriesDefaults: {
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
padding: 10
}
}
});
In GWT, how do you set the position of an Image object after it was added to a Panel? There does not seem to be a method to set the Image top and left positions. Do we have to remove the image from the Panel and add it again using the desired left and top values? What is the best approach?
If you set absolute positions, you can
int top = myPanel.getAbsoluteTop();
int left = myPanel.getAbsoluteLeft();
myImage.getElement().getStyle().setTop(top + 100, Unit.PX);
myImage.getElement().getStyle().setLeft(left + 100, Unit.PX);
Alternatively, you can set "position: relative" style on your image. Then you can set "top" and "left" on an image, and it would position itself relative to its parent element.
From the way your questions is asked, I assume that you are trying to use GWT as you would use Swing or SWT from Java. This is not the way GWT is ment to used and leads to very bad code and very bad projects most of the time.
GWT is not about hiding the browser. So if you want to change the postion of an element you would do that mostly with CSS.
Simply add two css classes to your project
.before{
position: relative;
top: 0px;
left: 0px;
}
.after{
position: relative;
top: 100px;
left: 100px;
}
at first give your image the first class:
image.addStyleName("before");
and later:
image.addStyleName("after");
If you really need to make this dynamically (some calculated size) you can just set the style property of the element:
image.getElement().getStyle().setLeft(value, Unit.PX);
image.getElement().getStyle().setTop(value, Unit.PX);
What I did was simply:
absolutePanel.setWidgetPosition(myImage, newXvalue, newYvalue);
Assuming that 'myImage' was a child of absolutePanel.