mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
I got transparency to work!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@906 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2fe7465d03
commit
d42cc321ff
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2000-07-20 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/Makefile.am (INCLUDES): remove image directory from include
|
||||
path.
|
||||
|
||||
* src/bullet_forms.C (create_form_form_bullet): small cleanup.
|
||||
* src/bullet_forms_cb.C (BulletPanelCB): ditto.
|
||||
|
||||
* src/LyXView.C (create_form_form_main): read the application icon
|
||||
from the disk.
|
||||
|
||||
* lib/images/*.xpm: change the icons to use transparent color for
|
||||
background.
|
||||
|
||||
* src/toolbar.C (update): change the color of the button when it
|
||||
is toggled on.
|
||||
|
||||
2000-07-20 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/lyxfunc.C (Dispatch): use LyXView::ShowState instead of
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * close_xpm[] = {
|
||||
"20 20 5 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #7B7B00000000",
|
||||
"X c #000000000000",
|
||||
"o c #9A9A94949494",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * make_ascii_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c black",
|
||||
" ",
|
||||
" .................. ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * make_latex_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c black",
|
||||
" ",
|
||||
" .................. ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * open_xpm[] = {
|
||||
"20 20 5 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c navy",
|
||||
"X c #000000000000",
|
||||
"o c #9A9A94949494",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * print1_xpm[] = {
|
||||
"24 20 7 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
"X c #FFFFFFFFFFFF",
|
||||
"o c #7B7B00000000",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * update_ps_xpm[] = {
|
||||
"20 20 3 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
".c navy",
|
||||
"Xc black",
|
||||
" ... ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * run_latex_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" . .. . . . .. ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * view_ps_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" .............. ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * view_dvi_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" .............. ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * save_xpm[] = {
|
||||
"20 20 5 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c black",
|
||||
"X c gray70",
|
||||
"o c gray90",
|
||||
|
@ -2,7 +2,7 @@
|
||||
static char const * build_xpm[] = {
|
||||
"20 20 4 1",
|
||||
". c black",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
"+ c white",
|
||||
"O c red",
|
||||
" ... ",
|
||||
|
@ -2,7 +2,7 @@
|
||||
static char const * copy_xpm[] = {
|
||||
"20 20 5 1",
|
||||
" c #000000000000",
|
||||
". c #BFBFBFBFBFBF",
|
||||
". c None",
|
||||
"X c #FFFFFFFFFFFF",
|
||||
"o c navy",
|
||||
"O c #B2B2ABABACAC",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * cut_xpm[] = {
|
||||
"20 20 3 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
"X c #7B7B00000000",
|
||||
" ",
|
||||
|
@ -5,7 +5,7 @@ static char const * depth_xpm[] = {
|
||||
". c #000000000000",
|
||||
"X c #FFFFFFFFFFFF",
|
||||
"o c #7B7B00000000",
|
||||
"O c #BFBFBFBFBFBF",
|
||||
"O c None",
|
||||
" ",
|
||||
".XXXXXXXXXXXXXXXXXX.",
|
||||
".XX..............XX.",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * fig_xpm[] = {
|
||||
"20 20 4 1",
|
||||
" c #000000000000",
|
||||
" c None",
|
||||
". c #FFFFFFFFFFFF",
|
||||
"X c #7B7B00000000",
|
||||
"o c gray70",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * bold_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" ... .... ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * emph_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" .. ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * free_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * noun_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" .. ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * sans_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
" ",
|
||||
" .... ",
|
||||
|
@ -2,7 +2,7 @@
|
||||
static char const * layout_scrap_xpm[] = {
|
||||
" 20 20 3 1",
|
||||
". c gray30",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
"c c black",
|
||||
"c c",
|
||||
" c .c.c.. ",
|
||||
|
@ -3,7 +3,7 @@ static char const * quit_xpm[] = {
|
||||
/* width height num_colors chars_per_pixel */
|
||||
" 20 20 7 1",
|
||||
/* colors */
|
||||
". c #b2c0dc",
|
||||
". c None",
|
||||
"# c #4d4d4d",
|
||||
"a c #000000",
|
||||
"b c #737373",
|
||||
|
@ -3,7 +3,7 @@ static char const * margin_xpm[] = {
|
||||
"20 20 5 1",
|
||||
" c gray60",
|
||||
". c #000000000000",
|
||||
"X c #BFBFBFBFBFBF",
|
||||
"X c None",
|
||||
"o c #FFFFFFFFFFFF",
|
||||
"O c #7B7B00000000",
|
||||
" .................XX",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * math_xpm[] = {
|
||||
"20 20 4 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #242423238E8E",
|
||||
"X c #000000000000",
|
||||
"o c #FFFFFFFFFFFF",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * melt_xpm[] = {
|
||||
"20 20 5 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
"X c gray60",
|
||||
"o c gray70",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * paste_xpm[] = {
|
||||
"20 20 6 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
"X c #E5E5E0E0E1E1",
|
||||
"o c navy",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * redo_bw_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c black",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * tab_xpm[] = {
|
||||
"20 20 3 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c #000000000000",
|
||||
"X c #FFFFFFFFFFFF",
|
||||
" ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * tex_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BEFBBEFBBEFB",
|
||||
" c None",
|
||||
". c #7B7B00000000",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* XPM */
|
||||
static char const * undo_bw_xpm[] = {
|
||||
"20 20 2 1",
|
||||
" c #BFBFBFBFBFBF",
|
||||
" c None",
|
||||
". c black",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -4,7 +4,7 @@ static char const * unknown_xpm[] = {
|
||||
" 20 20 2 1",
|
||||
/* colors */
|
||||
". c #000000000000",
|
||||
"# c #befbbefbbefb",
|
||||
"# c None",
|
||||
/* pixels */
|
||||
"####################",
|
||||
"####################",
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "toolbar.h"
|
||||
#include "minibuffer.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "lyx.xpm"
|
||||
#include "debug.h"
|
||||
#include "layout_forms.h"
|
||||
#include "intl.h"
|
||||
@ -254,17 +253,20 @@ void LyXView::create_form_form_main(int width, int height)
|
||||
//
|
||||
|
||||
// assign an icon to main form
|
||||
unsigned int w, h;
|
||||
Pixmap lyx_p, lyx_mask;
|
||||
lyx_p = fl_create_from_pixmapdata(fl_root,
|
||||
const_cast<char**>(lyx_xpm),
|
||||
&w,
|
||||
&h,
|
||||
&lyx_mask,
|
||||
0,
|
||||
0,
|
||||
0); // this leaks
|
||||
fl_set_form_icon(form_, lyx_p, lyx_mask);
|
||||
string iconname = LibFileSearch("images", "lyx", "xpm");
|
||||
if (!iconname.empty()) {
|
||||
unsigned int w, h;
|
||||
Pixmap lyx_p, lyx_mask;
|
||||
lyx_p = fl_read_pixmapfile(fl_root,
|
||||
iconname.c_str(),
|
||||
&w,
|
||||
&h,
|
||||
&lyx_mask,
|
||||
0,
|
||||
0,
|
||||
0); // this leaks
|
||||
fl_set_form_icon(form_, lyx_p, lyx_mask);
|
||||
}
|
||||
|
||||
// set min size
|
||||
fl_set_form_minsize(form_, 50, 50);
|
||||
|
@ -10,7 +10,7 @@ lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(LYX_LIBS) $(SIGC_LIBS) \
|
||||
@FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
|
||||
EXTRA_DIST = config.h.in stamp-h.in cheaders
|
||||
ETAGS_ARGS = --lang=c++
|
||||
INCLUDES = -I${top_srcdir}/images $(SIGC_CFLAGS) @FRONTEND_INCLUDES@
|
||||
INCLUDES = $(SIGC_CFLAGS) @FRONTEND_INCLUDES@
|
||||
localedir = $(datadir)/locale
|
||||
lyx_SOURCES = \
|
||||
BackStack.h \
|
||||
|
@ -29,7 +29,7 @@ FD_form_bullet *create_form_form_bullet(void)
|
||||
fl_set_object_boxtype(obj, FL_UP_BOX);
|
||||
fl_set_bmtable_pixmap_file(obj, 6, 6,
|
||||
LibFileSearch("images",
|
||||
"standard.xpm").c_str());
|
||||
"standard", "xpm").c_str());
|
||||
|
||||
fl_set_border_width(-1);
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 95, 20, 255, 70, "");
|
||||
|
@ -218,9 +218,10 @@ void BulletPanelCB(FL_OBJECT * /*ob*/, long data)
|
||||
new_panel = "standard";
|
||||
break;
|
||||
}
|
||||
new_panel += ".xpm";
|
||||
fl_set_bmtable_pixmap_file(fd_form_bullet->bmtable_bullet_panel, 6, 6,
|
||||
LibFileSearch("images", new_panel.c_str()).c_str());
|
||||
fl_set_bmtable_pixmap_file(fd_form_bullet->bmtable_bullet_panel,
|
||||
6, 6,
|
||||
LibFileSearch("images", new_panel,
|
||||
"xpm").c_str());
|
||||
fl_redraw_object(fd_form_bullet->bmtable_bullet_panel);
|
||||
fl_unfreeze_form(fd_form_bullet->form_bullet);
|
||||
}
|
||||
|
@ -145,8 +145,10 @@ void Toolbar::update()
|
||||
// know how to use transparency with
|
||||
// Xpm library. It seems pretty
|
||||
// complicated to me (JMarc)
|
||||
fl_set_object_color(p->icon, FL_LEFT_BCOL, FL_BLUE);
|
||||
fl_set_object_boxtype(p->icon, FL_DOWN_BOX);
|
||||
} else {
|
||||
fl_set_object_color(p->icon, FL_MCOL, FL_BLUE);
|
||||
fl_set_object_boxtype(p->icon, FL_UP_BOX);
|
||||
}
|
||||
|
||||
@ -287,7 +289,6 @@ void Toolbar::set(bool doingmain)
|
||||
NorthWestGravity);
|
||||
fl_set_object_callback(obj, C_Toolbar_ToolbarCB,
|
||||
static_cast<long>(item->action));
|
||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||
// Remove the blue feedback rectangle
|
||||
fl_set_pixmapbutton_focus_outline(obj, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user