source: trunk/tools/designer/shared/globaldefs.h@ 25

Last change on this file since 25 was 2, checked in by dmik, 20 years ago

Imported xplatform parts of the official release 3.3.1 from Trolltech

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qt Designer.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
12** licenses may use this file in accordance with the Qt Commercial License
13** Agreement provided with the Software.
14**
15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17**
18** See http://www.trolltech.com/gpl/ for GPL licensing information.
19** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
20** information about Qt Commercial License Agreements.
21**
22** Contact info@trolltech.com if any conditions of this licensing are
23** not clear to you.
24**
25**********************************************************************/
26
27#ifndef GLOBALDEFS_H
28#define GLOBALDEFS_H
29
30#include <qcolor.h>
31#include <qapplication.h>
32
33#define BOXLAYOUT_DEFAULT_MARGIN 11
34#define BOXLAYOUT_DEFAULT_SPACING 6
35
36#ifndef NO_STATIC_COLORS
37static QColor *backColor1 = 0;
38static QColor *backColor2 = 0;
39static QColor *selectedBack = 0;
40
41static void init_colors()
42{
43 if ( backColor1 )
44 return;
45
46#if 0 // a calculated alternative for backColor1
47 QColorGroup myCg = qApp->palette().active();
48 int h1, s1, v1;
49 int h2, s2, v2;
50 myCg.color( QColorGroup::Base ).hsv( &h1, &s1, &v1 );
51 myCg.color( QColorGroup::Background ).hsv( &h2, &s2, &v2 );
52 QColor c( h1, s1, ( v1 + v2 ) / 2, QColor::Hsv );
53#endif
54
55 backColor1 = new QColor( 250, 248, 235 );
56 backColor2 = new QColor( 255, 255, 255 );
57 selectedBack = new QColor( 230, 230, 230 );
58}
59
60#endif
61
62#endif
Note: See TracBrowser for help on using the repository browser.