|
|
@ -124,7 +124,7 @@ WirelessNetworkItem::paint (TQPainter *p, const TQColorGroup &/*cg*/, bool highl
|
|
|
|
p->setPen(parent->tqpalette ().active ().highlightedText ());
|
|
|
|
p->setPen(parent->tqpalette ().active ().highlightedText ());
|
|
|
|
pbarStrength->setBackgroundMode( TQt::PaletteHighlight, TQt::PaletteHighlight );
|
|
|
|
pbarStrength->setBackgroundMode( TQt::PaletteHighlight, TQt::PaletteHighlight );
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
p->setPen(parent->tqpalette ().active ().text ());
|
|
|
|
p->setPen(parent->palette ().active ().text ());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
p->drawText (x, y, w, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, getDisplayText());
|
|
|
|
p->drawText (x, y, w, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, getDisplayText());
|
|
|
|
|
|
|
|
|
|
|
@ -169,7 +169,7 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, Device* dev, WirelessNetw
|
|
|
|
// figure out the height of the text
|
|
|
|
// figure out the height of the text
|
|
|
|
_textHeight = kapp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
_textHeight = kapp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
// the item is height of the text plus the default frame width
|
|
|
|
// the item is height of the text plus the default frame width
|
|
|
|
_height = _textHeight + kapp->tqstyle ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
_height = _textHeight + kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
/* _height needs to be at least the height of a SmallIcon plus a border of one px (top & bottom)*/
|
|
|
|
/* _height needs to be at least the height of a SmallIcon plus a border of one px (top & bottom)*/
|
|
|
|
if (_height < _widgetHeight) {
|
|
|
|
if (_height < _widgetHeight) {
|
|
|
|
_height = _widgetHeight + 2;
|
|
|
|
_height = _widgetHeight + 2;
|
|
|
@ -177,8 +177,8 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, Device* dev, WirelessNetw
|
|
|
|
|
|
|
|
|
|
|
|
/* border required for pmLock and pbarStrength */
|
|
|
|
/* border required for pmLock and pbarStrength */
|
|
|
|
_border = 1;
|
|
|
|
_border = 1;
|
|
|
|
if (_border == kapp->tqstyle ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
if (_border == kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
_border += 2 * kapp->tqstyle ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
_border += 2 * kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
if (_border == 0)
|
|
|
|
if (_border == 0)
|
|
|
|
_border ++;
|
|
|
|
_border ++;
|
|
|
|
|
|
|
|
|
|
|
@ -209,7 +209,7 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, Device* dev, WirelessNetw
|
|
|
|
// figure out the height of the text
|
|
|
|
// figure out the height of the text
|
|
|
|
_textHeight = kapp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
_textHeight = kapp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
// the item is height of the text plus the default frame width
|
|
|
|
// the item is height of the text plus the default frame width
|
|
|
|
_height = _textHeight + kapp->tqstyle ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
_height = _textHeight + kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
/* _height needs to be at least the height of a SmallIcon plus a border of one px (top & bottom)*/
|
|
|
|
/* _height needs to be at least the height of a SmallIcon plus a border of one px (top & bottom)*/
|
|
|
|
if (_height < _widgetHeight) {
|
|
|
|
if (_height < _widgetHeight) {
|
|
|
|
_height = _widgetHeight + 2;
|
|
|
|
_height = _widgetHeight + 2;
|
|
|
@ -217,8 +217,8 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, Device* dev, WirelessNetw
|
|
|
|
|
|
|
|
|
|
|
|
/* border required for pmLock and pbarStrength */
|
|
|
|
/* border required for pmLock and pbarStrength */
|
|
|
|
_border = 1;
|
|
|
|
_border = 1;
|
|
|
|
if (_border == kapp->tqstyle ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
if (_border == kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
_border += 2 * kapp->tqstyle ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
_border += 2 * kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
if (_border == 0)
|
|
|
|
if (_border == 0)
|
|
|
|
_border ++;
|
|
|
|
_border ++;
|
|
|
|
|
|
|
|
|
|
|
|