1. Use icons for quit and num pad show/hide buttons.

2. Resize quit, num pad show/hide, configure buttons.
3. Add tooltips to the buttons.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/10/head
Ray-V 3 years ago committed by Michele Calgaro
parent 0de5e3251a
commit ed6e395fd0
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -379,17 +379,27 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
mappingNotify(NULL); mappingNotify(NULL);
quit = new VButton ( this,"quit" ); quit = new VButton ( this,"quit" );
quit->resize ( 15,30 ); quit->resize ( 20,30 );
quit->move ( 525,15 ); quit->move ( 524,15 );
quit->setPaletteBackgroundColor ( TQt::red ); quit->setPixmap(TQIconSet(SmallIcon("application-exit")).pixmap());
TQToolTip::add( quit, i18n( "Hide keyboard" ) );
quit->res(); quit->res();
other_keys.append(quit); other_keys.append(quit);
connect ( quit,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( quitClicked() ) ); connect ( quit,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( quitClicked() ) );
extent = new VButton(this,"extent"); extent = new VButton(this,"extent");
extent->resize( 15,65 ); extent->resize ( 20,65 );
extent->move(525, 85 ); extent->move (524, 85 );
extent->setText(">>"); if (extent_visible)
{
extent->setPixmap(TQIconSet(SmallIcon("media-seek-backward")).pixmap());
TQToolTip::add( extent, i18n( "Hide num pad" ) );
}
else
{
extent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
TQToolTip::add( extent, i18n( "Show num pad" ) );
}
extent->res(); extent->res();
other_keys.append(extent); other_keys.append(extent);
connect (extent, TQT_SIGNAL( clicked() ) , this, TQT_SLOT ( toggleNumericPad() ) ); connect (extent, TQT_SIGNAL( clicked() ) , this, TQT_SLOT ( toggleNumericPad() ) );
@ -546,13 +556,13 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
setLockState(locked); setLockState(locked);
popup_menu = new VButton ( this,"popupmenu" ); popup_menu = new VButton ( this,"popupmenu" );
popup_menu->resize ( 15,30 ); popup_menu->resize ( 20,30 );
popup_menu->move ( 525,15+35 ); popup_menu->move ( 524,15+35 );
//popup_menu->setPaletteBackgroundColor ( TQt::green ); //popup_menu->setPaletteBackgroundColor ( TQt::green );
popup_menu->res(); popup_menu->res();
popup_menu->setPixmap(TQIconSet(SmallIcon("configure")).pixmap()); popup_menu->setPixmap(TQIconSet(SmallIcon("configure")).pixmap());
TQToolTip::add( popup_menu, i18n( "Configure" ) );
other_keys.append(popup_menu); other_keys.append(popup_menu);
connect ( popup_menu,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( showConfigMenu() ) ); connect ( popup_menu,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( showConfigMenu() ) );
} }
@ -691,13 +701,15 @@ void MainWidget::toggleNumericPad()
if (extent_visible){ if (extent_visible){
extent_visible=false; extent_visible=false;
extent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
TQToolTip::add( extent, i18n( "Show num pad" ) );
TQWidget::resize ( (int)sdxs, height() ); TQWidget::resize ( (int)sdxs, height() );
extent->setText(">>");
} }
else{ else{
extent_visible=true; extent_visible=true;
extent->setText("<<"); extent->setPixmap(TQIconSet(SmallIcon("media-seek-backward")).pixmap());
TQWidget::resize ( (int)sdxb, height() ); TQToolTip::add( extent, i18n( "Hide num pad" ) );
TQWidget::resize ( (int)sdxb, height() );
} }
nresize=false; nresize=false;
} }
@ -952,7 +964,7 @@ KbdDock::KbdDock ( MainWidget *m )
icn=UserIcon ( "dock" ); icn=UserIcon ( "dock" );
resize ( 96,47 ); resize ( 96,47 );
TQToolTip::add ( this, "Toggle keyboard visibility" ); TQToolTip::add ( this, i18n ("Toggle keyboard visibility") );
} }
void KbdDock::paintEvent ( TQPaintEvent * ) void KbdDock::paintEvent ( TQPaintEvent * )

Loading…
Cancel
Save