diff options
author | Ray-V <ray-v@inbox.lv> | 2021-02-18 11:17:48 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-02-18 11:20:40 +0900 |
commit | 51c93c18da7ec7051e77e4181327214df74217fc (patch) | |
tree | c9528f2ce0727ae65d7471872503be8b5f158fa0 | |
parent | f8d86f0116f9f25ee34bc98bb00cdda127bc4fbb (diff) | |
download | kvkbd-51c93c18da7ec7051e77e4181327214df74217fc.tar.gz kvkbd-51c93c18da7ec7051e77e4181327214df74217fc.zip |
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>
(cherry picked from commit ed6e395fd03dc836ee48a75e29025934a5c515b4)
-rw-r--r-- | src/MainWidget.cpp | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/src/MainWidget.cpp b/src/MainWidget.cpp index 0d95146..4cb7666 100644 --- a/src/MainWidget.cpp +++ b/src/MainWidget.cpp @@ -379,17 +379,27 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const mappingNotify(NULL); quit = new VButton ( this,"quit" ); - quit->resize ( 15,30 ); - quit->move ( 525,15 ); - quit->setPaletteBackgroundColor ( TQt::red ); + quit->resize ( 20,30 ); + quit->move ( 524,15 ); + quit->setPixmap(TQIconSet(SmallIcon("application-exit")).pixmap()); + TQToolTip::add( quit, i18n( "Hide keyboard" ) ); quit->res(); other_keys.append(quit); connect ( quit,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( quitClicked() ) ); extent = new VButton(this,"extent"); - extent->resize( 15,65 ); - extent->move(525, 85 ); - extent->setText(">>"); + extent->resize ( 20,65 ); + extent->move (524, 85 ); + 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(); other_keys.append(extent); connect (extent, TQT_SIGNAL( clicked() ) , this, TQT_SLOT ( toggleNumericPad() ) ); @@ -546,13 +556,13 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const setLockState(locked); popup_menu = new VButton ( this,"popupmenu" ); - popup_menu->resize ( 15,30 ); - popup_menu->move ( 525,15+35 ); + popup_menu->resize ( 20,30 ); + popup_menu->move ( 524,15+35 ); //popup_menu->setPaletteBackgroundColor ( TQt::green ); popup_menu->res(); popup_menu->setPixmap(TQIconSet(SmallIcon("configure")).pixmap()); - + TQToolTip::add( popup_menu, i18n( "Configure" ) ); other_keys.append(popup_menu); connect ( popup_menu,TQT_SIGNAL ( clicked() ),this, TQT_SLOT ( showConfigMenu() ) ); } @@ -691,13 +701,15 @@ void MainWidget::toggleNumericPad() if (extent_visible){ extent_visible=false; + extent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap()); + TQToolTip::add( extent, i18n( "Show num pad" ) ); TQWidget::resize ( (int)sdxs, height() ); - extent->setText(">>"); } else{ extent_visible=true; - extent->setText("<<"); - TQWidget::resize ( (int)sdxb, height() ); + extent->setPixmap(TQIconSet(SmallIcon("media-seek-backward")).pixmap()); + TQToolTip::add( extent, i18n( "Hide num pad" ) ); + TQWidget::resize ( (int)sdxb, height() ); } nresize=false; } @@ -952,7 +964,7 @@ KbdDock::KbdDock ( MainWidget *m ) icn=UserIcon ( "dock" ); resize ( 96,47 ); - TQToolTip::add ( this, "Toggle keyboard visibility" ); + TQToolTip::add ( this, i18n ("Toggle keyboard visibility") ); } void KbdDock::paintEvent ( TQPaintEvent * ) |