extent_visible

The keyboard geometry is saved when either Quit or Hide keyboard is selected.
If the num pad is visible [extent_visible=true] when Kvkbd is closed down - ie Quit from the configuration menu - then when it is run again, with the default being extent_visible=false, the keyboard will display without the numpad but at an x-axis size which includes the num pad, ie elongated.

To fix this, add the state of extent_visible to the configuration file and start with that when Kvkbd is re-started.

Signed-off-by: Ray-V <ray-v@inbox.lv>
pull/9/head
Ray-V 4 years ago
parent b91a1768a0
commit 3503aa510b

@ -74,9 +74,10 @@ MainWidget::MainWidget ( TDEAboutData *about, bool tren, TQWidget *parent, const
int stx=15;
int sty=15;
extent_visible=false;
TDEConfig *cfg = TDEApplication::kApplication()->config();
// if the num pad was visible when Kvkbd was 'Quit', the geometry includes it, so start with the num pad in the same state
extent_visible = cfg->readBoolEntry("numpad_visible",false);
// if "kbColor" entry doesn't exist - either because it hasn't been saved
// or kvkbdrc doesn't exist, default to "#cdc0b0"
TQColor bc = cfg->readEntry ("kbColor","#cdc0b0");
@ -663,6 +664,7 @@ void MainWidget::hideEvent ( TQHideEvent * )
cfg = TDEApplication::kApplication()->config();
if (cfg){
cfg->writeEntry("geometry",geometry());
cfg->writeEntry("numpad_visible",extent_visible);
cfg->sync();
}
}

Loading…
Cancel
Save