grey-out comboxes when they are disabled; disable toolbar layout combox when forceDefaultParagraph is true; enlarge a bit the toolbar tooltips

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3427 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-01-20 23:17:17 +00:00
parent 41fa514da8
commit 804493f2c4
6 changed files with 45 additions and 6 deletions

View File

@ -1,5 +1,10 @@
2002-01-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyx_gui.C (init): give the toolbar tooltips a normal font.
* lyxfunc.C (getStatus): handle LFUN_LAYOUT like
LFUN_LAYOUT_PARAGRAPHS.
* tabular.C (GetCellFromInset): new method. Finds an inset in a
tabular. It is possible to provide a possible cell, which will
typically be the actcell from the corresponding insettabular

View File

@ -1,3 +1,12 @@
2002-01-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* Toolbar_pimpl.C (update): disable layout combox when LFUN_LAYOUT
is disabled
* combox.C (activate):
(deactivate): change color of labels to reflect the state of the
combox
2002-01-16 Herbert Voss <voss@lyx.org>
* FormExternal.C (build): activate apply/ok-button when something

View File

@ -211,6 +211,11 @@ void Toolbar::Pimpl::update()
}
else
fl_activate_object(p->icon);
} else if (p->action == ToolbarDefaults::LAYOUTS && combox) {
if (owner->getLyXFunc()->getStatus(LFUN_LAYOUT).disabled())
combox->deactivate();
else
combox->activate();
}
}
}

View File

@ -358,17 +358,31 @@ void Combox::hide(int who)
void Combox::activate()
{
if (browser) fl_activate_object(browser);
if (button) fl_activate_object(button);
if (label) fl_activate_object(label);
if (browser)
fl_activate_object(browser);
if (button) {
fl_activate_object(button);
fl_set_object_lcol(button, FL_BLACK);
}
if (label) {
fl_activate_object(label);
fl_set_object_lcol(label, FL_BLACK);
}
}
void Combox::deactivate()
{
if (browser) fl_deactivate_object(browser);
if (button) fl_deactivate_object(button);
if (label) fl_deactivate_object(label);
if (browser)
fl_deactivate_object(browser);
if (button) {
fl_deactivate_object(button);
fl_set_object_lcol(button, FL_INACTIVE);
}
if (label) {
fl_deactivate_object(label);
fl_set_object_lcol(label, FL_INACTIVE);
}
}

View File

@ -241,6 +241,11 @@ void LyXGUI::init()
fl_setpup_fontsize(FL_NORMAL_SIZE);
fl_setpup_color(FL_MCOL, FL_BLACK);
fl_set_goodies_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
#if FL_REVISION < 89
fl_set_oneliner_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
#else
fl_set_tooltip_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
#endif
// all lyxrc settings has to be done here as lyxrc has not yet
// been read when the GUI is created (Jug)

View File

@ -420,6 +420,7 @@ FuncStatus LyXFunc::getStatus(kb_action action,
&& !tli->getFirstLockingInsetOfType(Inset::TABULAR_CODE));
break;
case LFUN_LAYOUT:
case LFUN_LAYOUT_PARAGRAPH: {
Inset * inset = TEXT(false)->cursor.par()->inInset();
disable = inset && inset->forceDefaultParagraphs(inset);