|
|
|
@ -175,10 +175,10 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, TQString dev, WirelessNet
|
|
|
|
|
// set the widget height to that of a small icon
|
|
|
|
|
_widgetHeight = SmallIcon (NULL, TQIconSet::Automatic).height ();
|
|
|
|
|
// figure out the height of the text
|
|
|
|
|
_textHeight = kapp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
|
_textHeight = tdeApp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
|
|
|
|
|
|
// the item is height of the text plus the default frame width
|
|
|
|
|
_height = _textHeight + kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
_height = _textHeight + tdeApp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
|
|
|
|
|
/* _height needs to be at least the height of a SmallIcon plus a border of one px (top & bottom)*/
|
|
|
|
|
if (_height < _widgetHeight) {
|
|
|
|
@ -187,12 +187,12 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, TQString dev, WirelessNet
|
|
|
|
|
|
|
|
|
|
/* border required for pmLock and pbarStrength */
|
|
|
|
|
_border = 1;
|
|
|
|
|
if (_border == kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
|
_border += 2 * kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
if (_border == tdeApp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
|
_border += 2 * tdeApp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
if (_border == 0)
|
|
|
|
|
_border ++;
|
|
|
|
|
|
|
|
|
|
_width = kapp->fontMetrics().size(AlignLeft | AlignVCenter | DontClip | ShowPrefix, getDisplayText()).width(); /* essid */
|
|
|
|
|
_width = tdeApp->fontMetrics().size(AlignLeft | AlignVCenter | DontClip | ShowPrefix, getDisplayText()).width(); /* essid */
|
|
|
|
|
_width += SmallIcon (NULL, TQIconSet::Automatic).width (); /* pmLock */
|
|
|
|
|
_width += _space; /* pmLock <-> pbarStrength */
|
|
|
|
|
_width += 100; /* pbarStrength */
|
|
|
|
@ -219,9 +219,9 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, TQString dev, WirelessNet
|
|
|
|
|
// set the widget height to that of a small icon
|
|
|
|
|
_widgetHeight = SmallIcon (NULL, TQIconSet::Automatic).height ();
|
|
|
|
|
// figure out the height of the text
|
|
|
|
|
_textHeight = kapp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
|
_textHeight = tdeApp->fontMetrics ().size (AlignLeft | AlignVCenter | DontClip | ShowPrefix, _net.getDisplaySsid()).height ();
|
|
|
|
|
// the item is height of the text plus the default frame width
|
|
|
|
|
_height = _textHeight + kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
_height = _textHeight + tdeApp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
/* _height needs to be at least the height of a SmallIcon plus a border of one px (top & bottom)*/
|
|
|
|
|
if (_height < _widgetHeight) {
|
|
|
|
|
_height = _widgetHeight + 2;
|
|
|
|
@ -229,12 +229,12 @@ WirelessNetworkItem::WirelessNetworkItem (TQWidget* p, TQString dev, WirelessNet
|
|
|
|
|
|
|
|
|
|
/* border required for pmLock and pbarStrength */
|
|
|
|
|
_border = 1;
|
|
|
|
|
if (_border == kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
|
_border += 2 * kapp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
if (_border == tdeApp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth))
|
|
|
|
|
_border += 2 * tdeApp->style ().pixelMetric (TQStyle::PM_DefaultFrameWidth);
|
|
|
|
|
if (_border == 0)
|
|
|
|
|
_border ++;
|
|
|
|
|
|
|
|
|
|
_width = kapp->fontMetrics().size(AlignLeft | AlignVCenter | DontClip | ShowPrefix, getDisplayText()).width(); /* essid */
|
|
|
|
|
_width = tdeApp->fontMetrics().size(AlignLeft | AlignVCenter | DontClip | ShowPrefix, getDisplayText()).width(); /* essid */
|
|
|
|
|
_width += SmallIcon (NULL, TQIconSet::Automatic).width (); /* pmLock */
|
|
|
|
|
_width += _space; /* pmLock <-> pbarStrength */
|
|
|
|
|
_width += 100; /* pbarStrength */
|
|
|
|
|