mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-1660 Add ticks on slider, QT stylesheet bug
This commit is contained in:
parent
b82b10e832
commit
4afe6f2e1a
@ -7,7 +7,7 @@ MyListWidget {
|
||||
Utils--StyledBar {
|
||||
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(200, 200, 200, 255));
|
||||
}
|
||||
|
||||
/*
|
||||
QSlider::groove:horizontal {
|
||||
border: 1px solid rgb(196, 196, 196);
|
||||
background: white;
|
||||
@ -15,6 +15,7 @@ QSlider::groove:horizontal {
|
||||
border-radius: 2px;
|
||||
margin 10px 10px;
|
||||
}
|
||||
*/
|
||||
|
||||
QSlider::add-page:horizontal {
|
||||
background: #fff;
|
||||
@ -110,3 +111,5 @@ QSlider::handle:horizontal:hover {
|
||||
border: 1px solid #444;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,6 +58,15 @@ void InputChannelForm::minMaxUpdated()
|
||||
void InputChannelForm::neutralUpdated()
|
||||
{
|
||||
int neutralValue = ui->neutralValue->value();
|
||||
int min = ui->channelMin->value();
|
||||
int max = ui->channelMax->value();
|
||||
|
||||
int tickSpacing = abs((max-min) / 2);
|
||||
if (ui->channelName->text() == "FlightMode") {
|
||||
tickSpacing = abs((max-min) / 5);
|
||||
}
|
||||
ui->channelNeutral->setTickPosition(QSlider::TicksBothSides);
|
||||
ui->channelNeutral->setTickInterval(tickSpacing);
|
||||
|
||||
if (ui->channelRev->isChecked()) {
|
||||
if (neutralValue > ui->channelMin->value()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user