diff options
author | Ray-V <[email protected]> | 2021-02-18 11:17:48 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-02-18 11:19:57 +0900 |
commit | ed6e395fd03dc836ee48a75e29025934a5c515b4 (patch) | |
tree | f2f2143e54a06eb4db52a2643d1cfc24d2cebccd /src | |
parent | 0de5e3251ab72caadef37eec0fd1c78e0243fdfb (diff) | |
download | kvkbd-ed6e395fd03dc836ee48a75e29025934a5c515b4.tar.gz kvkbd-ed6e395fd03dc836ee48a75e29025934a5c515b4.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 <[email protected]>
Diffstat (limited to 'src')
-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 * ) |