QSlider with a custom stylesheet to make pressed handle bigger - stylesheet

i want to make a material like slider. The slider handle should get bigger when pressed, but when I click on it, it makes this:
top: not clicked, bottom: klicked
And after I move the handle its getting bigger.
I'm using a stylesheet:
...
QSlider::handle:horizontal {
background: #009ceb;
width: 24px;
margin: -12px 0;
border-radius: 12px;
border-style: solid;
border-width: 1px;
border-color: #009ceb;
}
QSlider::handle:horizontal:pressed{
background: #009ceb;
width: 36px;
margin: -18px 0;
border-style: solid;
border-radius: 18px;
border-width: 1px;
}
...

Related

Power virtual agents UI Send box

Hi Currently my send message box appears like this
I want to integrate it within the chatbot
I have this styles added to the box
.style {
position: fixed;
right: 0px;
height: 85%;
bottom: 50px;
width: 30%;
margin-right: 16px;
margin-bottom: 18px;
border: 2px solid #053364;
z-index: 2;
border-radius: 25px 25px 25px 25px;
}

I created a input and i want to make the icon on the left of input bar and the text to the right of input bar, i tryed text-align in css doesnt work

HTML:
<input id="bill" placeholder="&#xf155">
CSS:
#bill {
display: block;
margin: auto;
position: relative;
top: 80px;
left: 35px;
display: inline-block;
border-radius: 3px;
padding: 4px;
width: 35%;
border: 2px solid rgb(13, 158, 143);
font-family: 'fontAwesome';
}
I want dollar sign on the left corner of input bar and text on the right corner of
input bar.

Is there a way to change the height of the items of the drop down list of a QComboBox through the stylesheet?

I would like to have all the comboboxes of my application similar to the PyCharm ones. I was able to change the box itself but not the drop-down list.
Here's what I would like to have:
Here's what I have:
I would like to increase the height of the items, the space between them and to remove the dotted border when the mouse hovers the item. All of this using the stylesheet, since I want all QComboBox to be like this.
Here's my stylesheet:
QComboBox{
font-family: "Segoe UI";
font-size: 8pt;
border-radius: 3px;
border: 1px solid;
border-color: rgb(175, 175, 175);
padding: 3px;
padding-right: 8px;
padding-left: 8px;
background-color: white;
margin: 1px;
}
QComboBox:focus, QComboBox:on{
border-radius: 4px;
border: 3px solid rgb(151, 195, 243);
margin:0px;
}
QComboBox::drop-down{
border:none;
}
QComboBox::down-arrow{
right: 4px;
image: url(:/custom/custom_icons/down-arrow.png);
}
QComboBox QAbstractItemView{
border: 1px solid rgb(175, 175, 175);
}
QComboBox QAbstractItemView::item {
height: 50px; /*not working*/
}

Change pseudo element color on selected state

I want to change arrow color as well as circle when click on it. I am using LESS and getting right place to add border-top-color: #0066ff; Can anyone suggest please? Here is code:
LESS:
.circle {
border-radius: 50%;
box-sizing: border-box;
width: 225px;
height:225px;
border: 6px solid #ff6600;
border-radius: 50%;
position: relative;
cursor:pointer;
&.selected {
border: 6px solid #0066ff;
}
&:after {
top: 104%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(136, 183, 213, 0);
border-top-color: #ff6600;
border-width: 10px;
margin-left: -10px;
transform: scaleY(1.6);
&.selected {
border-top-color: #0066ff;
}
}
}
HTML:
<div class="circle"></div>
JS:
$(document).ready(function(){
$('.circle').on('click', function(){
$(this).addClass('selected');
});
});
JS fiddle is here:
https://jsfiddle.net/kunjsharma/6eu431hp/1/
You need to put :after inside .selected: see this fiddle
.circle {
border-radius: 50%;
box-sizing: border-box;
width: 225px;
height:225px;
border: 6px solid #ff6600;
border-radius: 50%;
position: relative;
cursor:pointer;
&.selected {
border: 6px solid #0066ff;
&:after { // <-- moved this inside .selected
border-top-color: #0066ff;
}
}
// rest of the styles...
}

background reverses border-radius

Why reverses a background property of a lower element the border-radius set on a higher element?
I have this HTML code:
<div class="wrapper">
<div class="content">
<div class="header">Title</div>
<div class="form"></div>
</div>
</div>
And this CSS code:
.wrapper {
background: none repeat scroll 0 0 #F8F8F8;
border-radius: 5px 5px 5px 5px;
height: 250px;
left: 100px;
overflow: visible;
position: absolute;
top: 10%;
width: 400px;
z-index: 10000
.header {
background: none repeat scroll 0 0 #222222;
border-top-left-radius: 5px;
box-shadow: 0 0 5px #444444;
position: relative;
z-index: 1;
}
}
The result is that there is no border-radius at the top, just at the bottom. If I remove the background property of the .headerclass the border-radius works on all four sides. What is the problem here?
You are nesting a selector inside other, which is wrong.
Try this.
.wrapper {
background: none repeat scroll 0 0 #F8F8F8;
border-radius: 5px 5px 5px 5px;
height: 250px;
left: 100px;
overflow: visible;
position: absolute;
top: 10%;
width: 400px;
z-index: 10000
}
.header {
background: none repeat scroll 0 0 #222222;
border-top-left-radius: 5px;
box-shadow: 0 0 5px #444444;
position: relative;
z-index: 1;
}
this must work,
and if you apply any background color on any of the child div then you have to explicitly set its corner radius..
Check this
http://jsfiddle.net/arunberti/LtRUu/
.wrapper {
background: none repeat scroll 0 0 red;
border-radius: 5px 5px 5px 5px;
height: 250px;
left: 100px;
overflow: visible;
position: absolute;
top: 10%;
width: 400px;
z-index: 10000;
color:red;
}
.header {
background: none repeat scroll 0 0 #222222;
border-top-left-radius: 5px;
box-shadow: 0 0 5px #444444;
position: relative;
z-index: 1;
}