gambas-source-code/gb.qt/share/gb.form.font.h
Benoît Minisini 6ca5126595 [DEVELOPMENT ENVIRONMENT]
* NEW: Little changes in the hall of fame animation.

[INTERPRETER]
* NEW: Do not warn against circular references when the program aborts 
  because of an error.

[COMPILER]
* NEW: The error message displayed when you try to return a value in a 
  procedure is more explicit now.

[GB.FORM.MDI]
* BUG: When a MDI child window is activated, the focus is set on it unless 
  one of its child control already has the focus.

[GB.GTK]
* BUG: Fix Application.Busy when forms are embedded.
* BUG: ComboBox does not raise the Click event anymore when its Text 
  property changes.
* BUG: Fix the management of Window Activate and Deactivate events.
* BUG: Fix the management of GotFocus and LostFocus events.
* BUG: SetFocus is correctly honored when used inside the Open event 
  handler of an embedded form.
* BUG: Desktop.Scale is now computed the same way as in gb.qt.

[GB.QT]
* BUG: SetFocus is correctly honored when used inside the Open event 
  handler of an embedded form.


git-svn-id: svn://localhost/gambas/trunk@1436 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-06-26 09:49:06 +00:00

33 lines
1.2 KiB
C

/***************************************************************************
gb.form.font.h
(c) 2000-2007 Benoit Minisini <gambas@users.sourceforge.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
***************************************************************************/
#ifndef __GB_FORM_FONT_H
#define __GB_FORM_FONT_H
#define FONT_STEP 20
#define GRADE_TO_SIZE(_grade, _desktop) ((int)(powf(_desktop, 1.0 + ((_grade) / (double)FONT_STEP)) + 0.5))
#define SIZE_TO_GRADE(_size, _desktop) ((int)(FONT_STEP * (logf(_size) / logf(_desktop)) + 0.5) - FONT_STEP)
#define GET_DESKTOP_SCALE(_font_height) (1 + (_font_height + 2) / 3)
#endif