mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
generic: misc cleanups
This commit is contained in:
parent
ada82e05bd
commit
ea7d68585f
6 changed files with 4 additions and 14 deletions
|
@ -160,10 +160,10 @@ KdmLayoutBox::update(QStack<QSize> &parentSizes, const QRect &parentGeometry, bo
|
||||||
if (havetot < opttot + (ccnt - 1) * spacing)
|
if (havetot < opttot + (ccnt - 1) * spacing)
|
||||||
spacing = (havetot - opttot) / (ccnt - 1);
|
spacing = (havetot - opttot) / (ccnt - 1);
|
||||||
int extra = havetot - opttot - (ccnt - 1) * spacing;
|
int extra = havetot - opttot - (ccnt - 1) * spacing;
|
||||||
int tesum, wesum, textra, wextra;
|
int tesum, wesum, wextra;
|
||||||
do {
|
do {
|
||||||
tesum = wesum = esum;
|
tesum = wesum = esum;
|
||||||
textra = wextra = extra;
|
wextra = extra;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
forEachVisibleChild (itm) {
|
forEachVisibleChild (itm) {
|
||||||
if (!lhs[idx].done) {
|
if (!lhs[idx].done) {
|
||||||
|
|
|
@ -41,7 +41,7 @@ int main( int argc, char* argv[] )
|
||||||
usage( argv[ 0 ] );
|
usage( argv[ 0 ] );
|
||||||
bool test = false;
|
bool test = false;
|
||||||
bool print_pid = false;
|
bool print_pid = false;
|
||||||
int* cpid;
|
int* cpid = 0;
|
||||||
for( int i = 2; // 1 is the theme
|
for( int i = 2; // 1 is the theme
|
||||||
i < argc;
|
i < argc;
|
||||||
++i )
|
++i )
|
||||||
|
|
|
@ -351,6 +351,3 @@ Qt::KeyboardModifiers x11ToQtKeyboardModifiers(int state)
|
||||||
#endif
|
#endif
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#ifndef KCMRULES
|
|
||||||
#include "moc_utils.cpp"
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -788,13 +788,11 @@ void KSignalPlotterPrivate::calculateNiceRange()
|
||||||
{
|
{
|
||||||
qreal max = mUserMaxValue;
|
qreal max = mUserMaxValue;
|
||||||
qreal min = mUserMinValue;
|
qreal min = mUserMinValue;
|
||||||
bool minFromUser = true;
|
|
||||||
if( mUseAutoRange ) {
|
if( mUseAutoRange ) {
|
||||||
if(!isnan(mMaxValue) && mMaxValue * 0.99 > max) //Allow max value to go very slightly over the given max, for rounding reasons
|
if(!isnan(mMaxValue) && mMaxValue * 0.99 > max) //Allow max value to go very slightly over the given max, for rounding reasons
|
||||||
max = mMaxValue;
|
max = mMaxValue;
|
||||||
if(!isnan(mMinValue) && mMinValue * 0.99 < min) {
|
if(!isnan(mMinValue) && mMinValue * 0.99 < min) {
|
||||||
min = mMinValue;
|
min = mMinValue;
|
||||||
minFromUser = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,7 @@ void Trash::dropEvent(QGraphicsSceneDragDropEvent *event)
|
||||||
QSizeF Trash::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
QSizeF Trash::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
||||||
{
|
{
|
||||||
if (which == Qt::PreferredSize) {
|
if (which == Qt::PreferredSize) {
|
||||||
int iconSize;
|
int iconSize = 0;
|
||||||
|
|
||||||
switch (formFactor()) {
|
switch (formFactor()) {
|
||||||
case Plasma::Planar:
|
case Plasma::Planar:
|
||||||
|
|
|
@ -109,11 +109,6 @@ void MonitorButton::paint(QPainter *p,
|
||||||
Q_UNUSED(option)
|
Q_UNUSED(option)
|
||||||
Q_UNUSED(widget)
|
Q_UNUSED(widget)
|
||||||
|
|
||||||
QIcon::Mode mode = QIcon::Disabled;
|
|
||||||
if (isChecked()) {
|
|
||||||
mode = QIcon::Normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPixmap icon = Plasma::PaintUtils::transition(d->icon.pixmap(d->imageSize, QIcon::Disabled),
|
QPixmap icon = Plasma::PaintUtils::transition(d->icon.pixmap(d->imageSize, QIcon::Disabled),
|
||||||
d->icon.pixmap(d->imageSize, QIcon::Normal),
|
d->icon.pixmap(d->imageSize, QIcon::Normal),
|
||||||
isChecked() ? 1 : d->highlighter.currentValue());
|
isChecked() ? 1 : d->highlighter.currentValue());
|
||||||
|
|
Loading…
Add table
Reference in a new issue