* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "statusbarspaceinfo.h"
***************************************************************************/
#include "statusbarspaceinfo.h"
const QColor c2 = KGlobalSettings::buttonTextColor();
const QColor frameColor((c1.red() + c2.red()) / 2,
(c1.green() + c2.green()) / 2,
const QColor c2 = KGlobalSettings::buttonTextColor();
const QColor frameColor((c1.red() + c2.red()) / 2,
(c1.green() + c2.green()) / 2,
painter.setPen(Qt::NoPen);
painter.setBrush(progressColor(backgrColor));
int usedWidth = barWidth - static_cast<int>((m_kBAvailable *
painter.setPen(Qt::NoPen);
painter.setBrush(progressColor(backgrColor));
int usedWidth = barWidth - static_cast<int>((m_kBAvailable *
- painter.drawRect(QRect(left, barTop + 2, right, barHeight - 2));
+ painter.drawRect(QRect(left, barTop + 2, right, barHeight - 1));
- text = i18n("%1% of %2 used", QString::number(100 - (int)(100.0 * m_kBAvailable / m_kBSize)), KIO::convertSizeFromKiB(m_kBSize));
- }
- else {
+ text = i18n("%1% of %2 used", 100 - (int)(100.0 * m_kBAvailable / m_kBSize), KIO::convertSizeFromKiB(m_kBSize));
+ } else {
QTimer::singleShot(0, this, SLOT(hide()));
}
}
// draw text (usually 'X% of Y GB used')
painter.setPen(KGlobalSettings::textColor());
QTimer::singleShot(0, this, SLOT(hide()));
}
}
// draw text (usually 'X% of Y GB used')
painter.setPen(KGlobalSettings::textColor());
- painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 4),
- Qt::AlignHCenter | Qt::AlignVCenter | Qt::TextWordWrap,
+ painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 6),
+ Qt::AlignCenter | Qt::TextWordWrap,
- const unsigned long& /* kBUsed */,
- const unsigned long& kBAvailable,
- const QString& /* mountPoint */)
+ const unsigned long& /* kBUsed */,
+ const unsigned long& kBAvailable,
+ const QString& /* mountPoint */)