improve login graphics

This commit is contained in:
jsorg71 2009-09-17 18:02:17 +00:00
parent 347ab74a93
commit d350ec5bfd
7 changed files with 28 additions and 8 deletions

View File

@ -40,7 +40,9 @@ xrdpsysconf_DATA = \
xrdppkgdatadir=$(datadir)/xrdp
xrdppkgdata_DATA = \
ad24b.bmp \
ad256.bmp \
xrdp24b.bmp \
xrdp256.bmp \
sans-10.fv1 \
cursor0.cur \

BIN
xrdp/ad24b.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
xrdp/xrdp24b.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -451,8 +451,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
/* read palette */
g_file_seek(fd, 14 + header.size);
init_stream(s, 8192);
g_file_read(fd, s->data, 256 * sizeof(int));
for (i = 0; i < 256; i++)
g_file_read(fd, s->data, header.clr_used * sizeof(int));
for (i = 0; i < header.clr_used; i++)
{
in_uint32_le(s, palette1[i]);
}
@ -501,8 +501,8 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
/* read palette */
g_file_seek(fd, 14 + header.size);
init_stream(s, 8192);
g_file_read(fd, s->data, 16 * sizeof(int));
for (i = 0; i < 16; i++)
g_file_read(fd, s->data, header.clr_used * sizeof(int));
for (i = 0; i < header.clr_used; i++)
{
in_uint32_le(s, palette1[i]);
}
@ -527,9 +527,13 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
if ((j & 1) == 0)
{
in_uint8(s, k);
color = (k >> 4) & 0xf;
}
color = palette1[(k & 0xf0) >> 4];
k <<= 4;
else
{
color = k & 0xf;
}
color = palette1[color];
if (self->bpp == 8)
{
color = xrdp_bitmap_get_index(self, palette, color);

View File

@ -487,7 +487,14 @@ xrdp_login_wnd_create(struct xrdp_wm* self)
{
/* image */
but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self);
if (self->screen->bpp > 8)
{
g_snprintf(file_path, 255, "%s/xrdp24b.bmp", XRDP_SHARE_PATH);
}
else
{
g_snprintf(file_path, 255, "%s/xrdp256.bmp", XRDP_SHARE_PATH);
}
xrdp_bitmap_load(but, file_path, self->palette);
but->parent = self->screen;
but->owner = self->screen;
@ -497,7 +504,14 @@ xrdp_login_wnd_create(struct xrdp_wm* self)
/* image */
but = xrdp_bitmap_create(4, 4, self->screen->bpp, WND_TYPE_IMAGE, self);
if (self->screen->bpp > 8)
{
g_snprintf(file_path, 255, "%s/ad24b.bmp", XRDP_SHARE_PATH);
}
else
{
g_snprintf(file_path, 255, "%s/ad256.bmp", XRDP_SHARE_PATH);
}
xrdp_bitmap_load(but, file_path, self->palette);
but->parent = self->login_window;
but->owner = self->login_window;