From 804493f2c43550874d8f0b048efff4a337dea590 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 20 Jan 2002 23:17:17 +0000 Subject: [PATCH] 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 --- src/ChangeLog | 5 +++++ src/frontends/xforms/ChangeLog | 9 +++++++++ src/frontends/xforms/Toolbar_pimpl.C | 5 +++++ src/frontends/xforms/combox.C | 26 ++++++++++++++++++++------ src/lyx_gui.C | 5 +++++ src/lyxfunc.C | 1 + 6 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b178353f51..ba66194bd0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2002-01-20 Jean-Marc Lasgouttes + * 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 diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 69fb2020e3..bd3873e536 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,12 @@ +2002-01-20 Jean-Marc Lasgouttes + + * 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 * FormExternal.C (build): activate apply/ok-button when something diff --git a/src/frontends/xforms/Toolbar_pimpl.C b/src/frontends/xforms/Toolbar_pimpl.C index 0440a290ef..9d5471d395 100644 --- a/src/frontends/xforms/Toolbar_pimpl.C +++ b/src/frontends/xforms/Toolbar_pimpl.C @@ -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(); } } } diff --git a/src/frontends/xforms/combox.C b/src/frontends/xforms/combox.C index 5edc3f6f03..188b5cff71 100644 --- a/src/frontends/xforms/combox.C +++ b/src/frontends/xforms/combox.C @@ -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); + } } diff --git a/src/lyx_gui.C b/src/lyx_gui.C index 9bb2bf2b82..50ebac4742 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -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) diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 26d83c051c..5ca26ab257 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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); -- 2.39.2