1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
15 Authors: Stefan Hundhammer <sh@suse.de>
16 Juergen Weigert <jw@suse.de>
18 Rectangles! Rounded rectangles everywhere, ...
19 A horror vision of the new CI.
24 #define y2log_component "qt-easter-bunny"
25 #include <ycp/y2log.h>
30 #include <qapplication.h>
31 #include <qdesktopwidget.h>
37 YQEasterBunny::layEgg()
40 const char * display = getenv( "DISPLAY" );
44 y2warning( "$DISPLAY not set - no easter egg" );
48 if ( strcmp( display, ":0" ) != 0 &&
49 strcmp( display, ":0.0" ) != 0 )
51 y2warning( "Not on system console - no easter egg" );
55 QDesktopWidget * screen = QApplication::desktop();
56 int width = screen->width();
57 int height = screen->height();
58 YFrameBuffer fb( width, height, screen->x11AppDepth() );
60 draw(&fb, width, height);
62 y2warning( "Easter egg disabled" );
68 YQEasterBunny::draw(YFrameBuffer *fb, int sw, int sh)