mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
add tooltip bottom
This commit is contained in:
parent
6b9e19ed58
commit
0c8013c26b
@ -88,7 +88,7 @@ void AwesomeWidget::updateTooltip()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
toolTipView->resize(100.0 * counts[QString("tooltip")], 100.0);
|
toolTipView->resize(100.0 * counts[QString("tooltip")], 105.0);
|
||||||
// boundaries
|
// boundaries
|
||||||
QMap<QString, float> boundaries;
|
QMap<QString, float> boundaries;
|
||||||
boundaries[QString("cpu")] = 100.0;
|
boundaries[QString("cpu")] = 100.0;
|
||||||
@ -137,9 +137,9 @@ void AwesomeWidget::updateTooltip()
|
|||||||
if (down) shift -= 100.0;
|
if (down) shift -= 100.0;
|
||||||
for (int j=0; j<tooltipValues[trueKeys[i]].count()-1; j++) {
|
for (int j=0; j<tooltipValues[trueKeys[i]].count()-1; j++) {
|
||||||
float x1 = j * normX + shift;
|
float x1 = j * normX + shift;
|
||||||
float y1 = - fabs(tooltipValues[trueKeys[i]][j]) * normY;
|
float y1 = - fabs(tooltipValues[trueKeys[i]][j]) * normY + 5.0;
|
||||||
float x2 = (j + 1) * normX + shift;
|
float x2 = (j + 1) * normX + shift;
|
||||||
float y2 = - fabs(tooltipValues[trueKeys[i]][j+1]) * normY;
|
float y2 = - fabs(tooltipValues[trueKeys[i]][j+1]) * normY + 5.0;
|
||||||
if (isBattery) {
|
if (isBattery) {
|
||||||
if (tooltipValues[trueKeys[i]][j+1] > 0)
|
if (tooltipValues[trueKeys[i]][j+1] > 0)
|
||||||
pen.setColor(QColor(configuration[QString("batteryColor")]));
|
pen.setColor(QColor(configuration[QString("batteryColor")]));
|
||||||
|
Loading…
Reference in New Issue
Block a user