Commit 0a8df2f9 authored by Yaroslav Sidlovsky's avatar Yaroslav Sidlovsky

Corrected min and max values for process priority slider

According to the `man 2 nice`:
The range of the nice value is +19 (low priority) to -20 (high priority).

BUG: 426774
parent d7ffece9
......@@ -188,8 +188,8 @@ void ReniceDlg::setSliderRange() {
//The slider is setting the priority, so goes from 19 to -20. We cannot actually do this with a slider, so instead we go from -19 to 20, and negate later
if(ui->sliderCPU->value() > 20) ui->sliderCPU->setValue(20);
ui->sliderCPU->setInvertedAppearance(true);
ui->sliderCPU->setMinimum(-19);
ui->sliderCPU->setMaximum(20);
ui->sliderCPU->setMinimum(-20);
ui->sliderCPU->setMaximum(19);
ui->sliderCPU->setTickInterval(5);
} else {
if(ui->sliderCPU->value() < 1) ui->sliderCPU->setValue(1);
......
......@@ -371,10 +371,10 @@ p, li { white-space: pre-wrap; }
<item row="0" column="0" colspan="2">
<widget class="QSlider" name="sliderCPU">
<property name="minimum">
<number>-19</number>
<number>-20</number>
</property>
<property name="maximum">
<number>20</number>
<number>19</number>
</property>
<property name="value">
<number>0</number>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment