|
|
@ -56,7 +56,7 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDEPopupMenu *help = m_help->menu();
|
|
|
|
TDEPopupMenu *help = m_help->menu();
|
|
|
|
help->connectItem(KHelpMenu::menuHelpContents, this, TQT_SLOT(slotHelpContents()));
|
|
|
|
help->connectItem(KHelpMenu::menuHelpContents, this, TQT_SLOT(slotHelpContents()));
|
|
|
|
setPixmap(KSystemTray::loadSizedIcon("randr", width()));
|
|
|
|
setPixmap(KSystemTray::loadIcon("randr"));
|
|
|
|
setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
|
|
setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
|
|
connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit()));
|
|
|
|
connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit()));
|
|
|
|
TQToolTip::add(this, i18n("Screen resize & rotate"));
|
|
|
|
TQToolTip::add(this, i18n("Screen resize & rotate"));
|
|
|
@ -113,7 +113,7 @@ void KRandRSystemTray::_quit (){
|
|
|
|
exit(0);
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KRandRSystemTray::resizeEvent ( TQResizeEvent * )
|
|
|
|
void KRandRSystemTray::resizeTrayIcon ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
|
|
|
|
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
|
|
|
|
TQPixmap origpixmap;
|
|
|
|
TQPixmap origpixmap;
|
|
|
@ -126,6 +126,18 @@ void KRandRSystemTray::resizeEvent ( TQResizeEvent * )
|
|
|
|
setPixmap(scaledpixmap);
|
|
|
|
setPixmap(scaledpixmap);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void KRandRSystemTray::resizeEvent ( TQResizeEvent * )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
|
|
|
|
|
|
|
|
resizeTrayIcon();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void KRandRSystemTray::showEvent ( TQShowEvent * )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
|
|
|
|
|
|
|
|
resizeTrayIcon();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void KRandRSystemTray::mousePressEvent(TQMouseEvent* e)
|
|
|
|
void KRandRSystemTray::mousePressEvent(TQMouseEvent* e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Popup the context menu with left-click
|
|
|
|
// Popup the context menu with left-click
|
|
|
|