Commit graph

988 commits

Author SHA1 Message Date
gambas
535469a228 Add Mouse.Click property.
[GB.QT4]
* NEW: Mouse.Click is a new property that returns the click index in a multi-click event.
* NEW: Style.Name is now lowercase.
* BUG: Some theme-specific workarounds for Style paint methods.

[GB.QT5]
* NEW: Mouse.Click is a new property that returns the click index in a multi-click event.
* NEW: Style.Name is now lowercase.
* BUG: Some theme-specific workarounds for Style paint methods.
2020-05-19 22:25:31 +02:00
gambas
a520d12ef4 Application.DarkTheme is a new property that returns if the current color scheme is dark.
[GB.GTK]
* NEW: Application.DarkTheme is a new property that returns if the current color scheme is dark.

[GB.GTK3]
* NEW: Application.DarkTheme is a new property that returns if the current color scheme is dark.

[GB.QT4]
* NEW: Application.DarkTheme is a new property that returns if the current color scheme is dark.

[GB.QT5]
* NEW: Application.DarkTheme is a new property that returns if the current color scheme is dark.
2020-05-18 13:23:27 +02:00
gambas
4ffe077529 System tray now works with QT5. Drawing on a cached DrawingArea does not display a warning message anymore.
[GB.DESKTOP.X11]
* BUG: System tray now works with QT5. A display glitch remains.

[GB.QT4]
* BUG: Drawing on a cached DrawingArea does not display a warning message anymore.

[GB.QT5]
* BUG: Drawing on a cached DrawingArea does not display a warning message anymore.
* BUG: X11 event filter correctly handle ClientMessage events now.
2020-05-11 18:37:21 +02:00
gambas
ee81637c72 Window: Add a State event that is raised when the window is minimized, maximized or set to fullscreen.
[GB.GTK]
* NEW: Window: Add a State event that is raised when the window is minimized, maximized or set to fullscreen.

[GB.GTK3]
* NEW: Window: Add a State event that is raised when the window is minimized, maximized or set to fullscreen.

[GB.QT4]
* NEW: Window: Add a State event that is raised when the window is minimized, maximized or set to fullscreen.

[GB.QT5]
* NEW: Window: Add a State event that is raised when the window is minimized, maximized or set to fullscreen.
2020-04-21 08:39:07 +02:00
gambas
ccf1491037 Fix Drag() that was returning the drag frame instead of the target control.
[GB.GTK]
* BUG: Fix Drag() that was returning the drag frame instead of the target control.

[GB.GTK3]
* BUG: Fix Drag() that was returning the drag frame instead of the target control.

[GB.GUI.BASE]
* BUG: Fix Drag() that was returning the drag frame instead of the target control.

[GB.QT4]
* BUG: Fix Drag() that was returning the drag frame instead of the target control.

[GB.QT5]
* BUG: Fix Drag() that was returning the drag frame instead of the target control.
2020-01-24 08:12:01 +01:00
gambas
da2db608bf TextBox: Add Placeholder property.
[GB.GTK]
* NEW: TextBox: Add Placeholder property. Beware that it does nothing as GTK+2 entry widget does not support placeholder text.

[GB.GTK3]
* NEW: TextBox: Add Placeholder property.

[GB.QT4]
* NEW: TextBox: Add Placeholder property.

[GB.QT5]
* NEW: TextBox: Add Placeholder property.
2020-01-24 08:08:42 +01:00
gambas
0ee8b98ca8 Raise Progress events later on the event loop, to avoir possible crashes of WebView methods.
[GB.QT4.WEBKIT]
* BUG: Raise Progress evens later on the event loop, to avoir possible crashes of WebView methods.

[GB.QT5.WEBKIT]
* BUG: Raise Progress events later on the event loop, to avoir possible crashes of WebView methods.
2020-01-07 02:05:12 +01:00
gambas
4ac699a2f7 Fix incorrect declarations of special methods.
[GB.QT4.WEBKIT]
* BUG: Fix incorrect declarations of special methods.

[GB.QT5.WEBKIT]
* BUG: Fix incorrect declarations of special methods.
2020-01-04 22:03:02 +01:00
gambas
63000a27fe WAIT NEXT is a new instruction that waits for the next event and process it.
[INTERPRETER]
* NEW: WAIT NEXT is a new instruction that waits for the next event and process it.

[COMPILER]
* NEW: Support for the new WAIT NEXT instruction.

[GB.GTK]
* NEW: Support for the new WAIT NEXT instruction.

[GB.GTK3]
* NEW: Support for the new WAIT NEXT instruction.

[GB.QT4]
* NEW: Support for the new WAIT NEXT instruction.

[GB.QT5]
* NEW: Support for the new WAIT NEXT instruction.
2020-01-02 13:08:45 +01:00
gambas
8f35362387 Window: set the window size at creation to 1x1, so that there is no default size.
[GB.QT4]
* BUG: Window: set the window size at creation to 1x1, so that there is no default size.

[GB.QT5]
* BUG: Window: set the window size at creation to 1x1, so that there is no default size.
2019-11-30 07:02:46 +01:00
Laurent Carlier
9e958b2c1e Fix warning about converting a packed CWIDGET pointer.....may result in an unaligned pointer value
Remove PACKED attribute - it doesn't change the size of CWIDGET (56 on x86_64)
2019-11-02 18:53:00 +01:00
Laurent Carlier
3d9f5cc914 Fix compiler warning in gb.qt5 about deprecation of QDesktopWidget::primaryScreen()
QApplication::desktop()->primaryScreen() is deprecated since Qt 5.11
Use QGuiApplication::primaryScreen() instead.
2019-11-02 18:53:00 +01:00
Laurent Carlier
a5836ec535 Fix compiler warning in gb.qt5 about deprecation of QDesktopWidget::availableGeometry() and QDesktopWidget::screenGeometry()
Both are deprecated since Qt 5.11
Use QGuiApplication::screens() instead.
2019-11-02 18:53:00 +01:00
Laurent Carlier
07f35841a3 Fix compiler warning in gb.qt5 about deprecation of QPainter::initFrom()
QPainter::initFrom() is deprecated since Qt 5.13
Use QPainter::begin() instead for both qt4 and qt5 components

v2: remove pf.begin() to avoid warning message "QPainter::begin: Painter already active"
2019-11-02 18:53:00 +01:00
Laurent Carlier
2e1dd1a233 Fix compiler warning in gb.qt5 about deprecation of QString::sprintf()
QString::sprintf() is deprecated since Qt 5.14
Use QString().arg() instead for both qt4 and qt5 components.
2019-11-02 18:53:00 +01:00
Laurent Carlier
082eb5b733 Fix compiler warning in gb.qt5 about deprecation of QString::null
QString::null is deprecated since Qt 5.9
Use QString() instead for both qt4 and qt5 components as it constructs a null string.
2019-11-02 18:53:00 +01:00
Laurent Carlier
daf012a246 Fix compiler warning in gb.qt5 about deprecation of QFontMetrics::width()
QFontMetrics::width() is deprecated since Qt 5.11
2019-11-02 18:52:49 +01:00
Laurent Carlier
f1deb8e330 Remove register keyword, deprecated, now reserved keyword with C++17
Fixes "warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]"
with clang

https://en.cppreference.com/w/cpp/keyword/register
2019-10-30 06:53:09 +00:00
gambas
65d2b783fe Paint.TextHeight is a new property that returns the height of one line of text, and Paint.FontScale is now "transparent".
[GB.DRAW]
* NEW: Paint.TextHeight is a new property that returns the height of one line of text. This is not the same as Paint.Font.Height, as the device resolution is taken into account.

[GB.GTK]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.

[GB.GTK3]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.

[GB.QT4]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.

[GB.QT5]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.
* BUG: Utility windows now kept being in front of their parent window correctly.
2019-10-26 01:06:18 +02:00
gambas
8a0c190b95 Apply Paint.FontScale only when Paint.Font is assigned. Not when one of the Paint.Font properties changes.
[GB.QT4]
* BUG: Apply Paint.FontScale only when Paint.Font is assigned. Not when one of the Paint.Font properties changes.

[GB.QT5]
* BUG: Apply Paint.FontScale only when Paint.Font is assigned. Not when one of the Paint.Font properties changes.
2019-10-19 00:37:17 +02:00
Laurent Carlier
6bb136b0cf [GB.QT5]
* BUG: Workaround "Setting a QCompleter on non-editable QComboBox is not allowed" message
2019-10-13 20:32:12 +02:00
gambas
47dddd944a Do not imbricate focus events.
[GB.GTK]
* BUG: Do not imbricate focus events.

[GB.GTK3]
* BUG: Do not imbricate focus events.

[GB.QT4]
* BUG: Do not imbricate focus events.

[GB.QT5]
* BUG: Do not imbricate focus events.
2019-10-12 23:55:38 +02:00
gambas
fbb0c62b99 Windows whose Utility property is set now use '_NET_WM_WINDOW_TYPE_DIALOG' instead of '_NET_WM_WINDOW_TYPE_DIALOG'.
[GB.QT4]
* BUG: Control.Next and Control.Previous now never return invalid controls.
* NEW: Windows whose Utility property is set now use '_NET_WM_WINDOW_TYPE_DIALOG' instead of '_NET_WM_WINDOW_TYPE_DIALOG'.

[GB.QT5]
* BUG: Control.Next and Control.Previous now never return invalid controls.
* NEW: Windows whose Utility property is set now use '_NET_WM_WINDOW_TYPE_DIALOG' instead of '_NET_WM_WINDOW_TYPE_DIALOG'.
2019-10-09 16:44:53 +02:00
gambas
7a49f039b5 Uncatched errors raised from an event handler can be ignored now.
[INTERPRETER]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.GTK]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.GTK3]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.QT4]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.QT5]
* NEW: Uncatched errors raised from an event handler can be ignored now.
2019-09-17 10:10:36 +02:00
gambas
ad7b2a4937 Automatically set Paint.FontScale when painting on a printer, so that font size is actually the same as on the screen.
[GB.GTK]
* NEW: Automatically set Paint.FontScale when painting on a printer, so that font size is actually the same as on the screen.

[GB.GTK3]
* NEW: Automatically set Paint.FontScale when painting on a printer, so that font size is actually the same as on the screen.

[GB.QT4]
* NEW: Automatically set Paint.FontScale when painting on a printer, so that font size is actually the same as on the screen.
* BUG: Fix rich text size margins between paragraphs and titles.
* BUG: Fix rich text size computation.

[GB.QT5]
* NEW: Automatically set Paint.FontScale when painting on a printer, so that font size is actually the same as on the screen.
* BUG: Fix rich text size margins between paragraphs and titles.
* BUG: Fix rich text size computation.
2019-07-10 04:19:02 +02:00
gambas
798b1d54cc Add Paint.FontScale, and make gb.gtk and gb.gtk3 printer drawing behave the same as QT components.
[GB.DRAW]
* NEW: Paint: FontScale is a new property that defines a scale applied to the size of the fonts assigned to the Paint.Font property.
* NEW: Paint: Scale() second argument is now optional, and takes the same value as the first argument if omitted.

[GB.GTK]
* NEW: Paint: Implementation of Paint.FontScale.
* BUG: Printer: All printer events are raised between a single Paint.Begin() / Paint.End().

[GB.GTK3]
* NEW: Paint: Implementation of Paint.FontScale.
* BUG: Printer: All printer events are raised between a single Paint.Begin() / Paint.End().
* BUG: Printer: Print() does now crash anymore.
* BUG: Printer: Font sizes now are the same as with QT components.

[GB.QT4]
* NEW: Paint: Implementation of Paint.FontScale.

[GB.QT5]
* NEW: Paint: Implementation of Paint.FontScale.
2019-07-09 19:35:01 +02:00
gambas
5fcf191a1f Editor: Fix Highlight.Alternate property.
[GB.QT4.EXT]
* BUG: Editor: Fix Highlight.Alternate property.
2019-07-04 20:52:17 +02:00
Laurent Carlier
53a8b5bde8 [GB.QT5]
* BUG: Fix build with Qt 5.13.

[GB.QT5.EXT]
* BUG: Fix build with Qt 5.13.

[GB.QT5.OPENGL]
* BUG: Fix build with Qt 5.13.

[GB.QT5.WEBKIT]
* BUG: Fix build with Qt 5.13.
2019-07-03 10:27:12 +02:00
gambas
dd121d669f Replace the message box native implementation by a Gambas implementation.
[GB.FORM.STOCK]
* NEW: Add a 128 pixel version of the 'delete' stock icon.

[GB.GTK]
* NEW: Message: Remove the message box native implementation.

[GB.GTK3]
* NEW: Message: Remove the message box native implementation.

[GB.GUI.BASE]
* NEW: Message: Implement the message boxes entirely in Gambas.

[GB.QT4]
* NEW: Message: Remove the message box native implementation.

[GB.QT5]
* NEW: Message: Remove the message box native implementation.
2019-06-05 03:08:22 +02:00
gambas
f1ac2f553b Implement Drag.Show() in Gambas, and consequently fix it in 'gb.gtk3'.
[GB.GTK]
* NEW: Drag.Show() and Drag.Hide() methods are now implemented in 'gb.gui.base'.
* NEW: Drag.X and Drag.Y properties are now writable.

[GB.GTK3]
* NEW: Drag.Show() and Drag.Hide() methods are now implemented in 'gb.gui.base'.
* NEW: Drag.X and Drag.Y properties are now writable.
* BUG: Finishing a drag & drop now correclty releases the button grab.

[GB.GUI.BASE]
* NEW: GridView: The padding of column headers is at least half of Desktop.Scale.
* NEW: ScrollArea: The Scroll() method returns TRUE now if no scrolling actually occured.
* BUG: TreeView: Item X property now correctly takes the TreeView padding into account.
* NEW: Drag.Show() and Drag.Hide() methods are now implemented in 'gb.gui.base'.

[GB.QT4]
* NEW: Drag.Show() and Drag.Hide() methods are now implemented in 'gb.gui.base'.
* NEW: Drag.X and Drag.Y properties are now writable.

[GB.QT5]
* NEW: Drag.Show() and Drag.Hide() methods are now implemented in 'gb.gui.base'.
* NEW: Drag.X and Drag.Y properties are now writable.
2019-06-01 04:52:25 +02:00
gambas
0ab84aa34a Disable top-level menus shortcuts when the window menu bar is hidden.
[GB.FORM]
* BUG: MenuButton: Use selected background color when the MenuOnly property is set and the MenuButton has the focus.

[GB.GTK]
* NEW: Disable top-level menus shortcuts when the window menu bar is hidden.

[GB.GTK3]
* NEW: Disable top-level menus shortcuts when the window menu bar is hidden.

[GB.GUI.BASE]
* NEW: Add helper function for disabling/enabling top-level menu shortcuts.

[GB.QT4]
* NEW: Disable top-level menus shortcuts when the window menu bar is hidden.

[GB.QT5]
* NEW: Disable top-level menus shortcuts when the window menu bar is hidden.
2019-05-25 22:25:13 +02:00
gambas
eb2934e9fa Drawing text now respects right-to-left languages the same way on every drawing device.
[GB.QT4]
* BUG: Drawing text now respects right-to-left languages the same way on every drawing device.

[GB.QT5]
* BUG: Drawing text now respects right-to-left languages the same way on every drawing device.
2019-05-08 19:40:39 +02:00
gambas
5f4bcb012d Dialog.SelectDirectory() now correctly shows hidden files when Dialog.ShowHidden is TRUE.
[GB.QT4]
* BUG: Dialog.SelectDirectory() now correctly shows hidden files when Dialog.ShowHidden is TRUE.

[GB.QT5]
* BUG: Dialog.SelectDirectory() now correctly shows hidden files when Dialog.ShowHidden is TRUE.
2019-05-07 01:27:11 +02:00
gambas
a0bcf85bd4 Active file descriptor watches and active timers are now automatically transferred to the component declaring a custom event loop.
[INTERPRETER]
* BUG: Active file descriptor watches and active timers are now automatically transferred to the component declaring a custom event loop. Consequently, a process started before the declaration of the event loop will have its termination signal correctly catched.
* NEW: Use waitpid() instead of wait4().

[GB.GTK]
* BUG: Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.

[GB.GTK3]
* BUG: Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.

[GB.QT4]
* BUG: Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.

[GB.QT5]
* BUG: Declare the event loop hook last so that active file descriptor watches and active transfer are automatically transferred.
2019-03-12 03:46:30 +01:00
gambas
245427b08e * Get rid of many gcc warnings. 2019-01-02 00:48:58 +01:00
gambas
0706d6d170 Remove the QT4 TextBox selection bug workaround. It prevents the selection method from working in some cases.
[GB.QT4]
* BUG: Remove the QT4 TextBox selection bug workaround. It prevents the selection method from working in some cases.

[GB.QT5]
* BUG: Remove the QT4 TextBox selection bug workaround. It prevents the selection method from working in some cases.
2018-12-10 22:39:07 +01:00
gambas
44a3f5f664 Control.Parent now ignores the inner containers of Container controls made in Gambas.
[GB.GTK]
* NEW: Control.Parent now ignores the inner containers of Container controls made in Gambas.
* NEW: Control._Parent is the old Parent property renamed.

[GB.GTK3]
* NEW: Control.Parent now ignores the inner containers of Container controls made in Gambas.
* NEW: Control._Parent is the old Parent property renamed.

[GB.QT4]
* NEW: Control.Parent now ignores the inner containers of Container controls made in Gambas.
* NEW: Control._Parent is the old Parent property renamed.

[GB.QT5]
* NEW: Control.Parent now ignores the inner containers of Container controls made in Gambas.
* NEW: Control._Parent is the old Parent property renamed.
2018-11-19 23:21:37 +01:00
gambas
7759a19f3a Button automatic resize is not freezed anymore when one of its parent is in design mode.
[GB.QT4]
* BUG: Button automatic resize is not freezed anymore when one of its parent is in design mode.

[GB.QT5]
* BUG: Button automatic resize is not freezed anymore when one of its parent is in design mode.
2018-11-14 23:40:16 +01:00
gambas
3f002896b5 Panels controls got a smaller default size.
[GB.GTK]
* NEW: Panels controls got a smaller default size.

[GB.GTK3]
* NEW: Panels controls got a smaller default size.

[GB.QT4]
* NEW: Panels controls got a smaller default size.

[GB.QT5]
* NEW: Panels controls got a smaller default size.
2018-10-11 12:33:31 +02:00
gambas
63cf3a235d MouseWheel events on disabled controls are correctly propagated now.
[GB.QT4]
* NEW: Mouse.State has now flags for keyboard modifiers too.
* BUG: MouseWheel events on disabled controls are correctly propagated now.

[GB.QT5]
* NEW: Mouse.State has now flags for keyboard modifiers too.
* BUG: MouseWheel events on disabled controls are correctly propagated now.
2018-10-08 16:34:41 +02:00
gambas
51230b935d ScrollBar: Correctly handle mouse wheel events.
[GB.QT4]
* BUG: ScrollBar: Correctly handle mouse wheel events.

[GB.QT5]
* BUG: ScrollBar: Correctly handle mouse wheel events.
2018-10-04 12:17:10 +02:00
gambas
1bf70e1e75 PictureBox is now implemented in Gambas.
[GB.GTK]
* NEW: Remove PictureBox control.

[GB.GTK3]
* NEW: Remove PictureBox control.

[GB.GUI.BASE]
* NEW: PictureBox is now implemented in Gambas.
* NEW: PictureBox: Image is a new property that allows to display an Image instead of a Picture.
* NEW: PictureBox: Mode is a new property that defines how the image fills the control.

[GB.QT4]
* NEW: Remove PictureBox control.

[GB.QT5]
* NEW: Remove PictureBox control.
2018-10-03 16:06:54 +02:00
gambas
0c4a0926a2 Fix mouse wheel events management again.
[GB.QT4]
* BUG: Fix mouse wheel events management again.

[GB.QT5]
* BUG: Fix mouse wheel events management again.
2018-09-28 17:59:17 +02:00
gambas
1f63103731 WebView: Correctly define the cache path.
[GB.QT4.WEBKIT]
* BUG: WebView: Correctly define the cache path.

[GB.QT5.WEBKIT]
* BUG: WebView: Correctly define the cache path.
2018-09-25 13:57:07 +02:00
gambas
6619f59263 Unify and fix the behaviour of the Container.Children property.
[GB.GTK]
* NEW: Container.Children now returns a real object that is a read-only array of references to all container children.
* NEW: Container.Children.Max is a new property that returns the number of container children minus one.

[GB.GTK3]
* NEW: Container.Children now returns a real object that is a read-only array of references to all container children.
* NEW: Container.Children.Max is a new property that returns the number of container children minus one.

[GB.QT4]
* NEW: Container.Children now returns a real object that is a read-only array of references to all container children.
* NEW: Container.Children.Max is a new property that returns the number of container children minus one.

[GB.QT5]
* NEW: Container.Children now returns a real object that is a read-only array of references to all container children.
* NEW: Container.Children.Max is a new property that returns the number of container children minus one.
2018-09-24 15:39:37 +02:00
gambas
7e6373982e WebSettings.Cache.Path now understands paths beginning with "~".
[GB.QT4.WEBKIT]
* BUG: WebSettings.Cache.Path now understands paths beginning with "~".

[GB.QT5.WEBKIT]
* BUG: WebSettings.Cache.Path now understands paths beginning with "~".
2018-09-22 13:07:18 +02:00
gambas
d2782ed91c WebView: Temporarily redirect stderr to /dev/null when creating the first WebView, to get rid of spurious libpng warnings on PNG files integrated inside the Qt WebKit library.
[GB.QT4.WEBKIT]
* BUG: WebView: Temporarily redirect stderr to /dev/null when creating the first WebView, to get rid of spurious libpng warnings on PNG files integrated inside the Qt WebKit library.

[GB.QT5.WEBKIT]
* BUG: WebView: Temporarily redirect stderr to /dev/null when creating the first WebView, to get rid of spurious libpng warnings on PNG files integrated inside the Qt WebKit library.
2018-09-19 20:51:13 +02:00
gambas
bf478f690c Workaround a QtWebkit but that made font size settings 3 points off.
[GB.QT4.WEBKIT]
* BUG: Workaround a QtWebkit but that made font size settings 3 points off.

[GB.QT5.WEBKIT]
* BUG: Workaround a QtWebkit but that made font size settings 3 points off.
2018-09-16 23:46:48 +02:00
gambas
f5e0d6ebbb Controls having a null size are now taken into by the arrangement routine, and are moved accordingly.
[GB.GTK]
* NEW: Controls having a null size are now taken into by the arrangement routine, and are moved accordingly.
* BUG: Set a cursor by trying all possible API, to be sure to find one existing.

[GB.GT3]
* NEW: Controls having a null size are now taken into by the arrangement routine, and are moved accordingly.
* BUG: Set a cursor by trying all possible API, to be sure to find one existing.

[GB.QT4]
* NEW: Controls having a null size are now taken into by the arrangement routine, and are moved accordingly.

[GB.QT5]
* NEW: Controls having a null size are now taken into by the arrangement routine, and are moved accordingly.
2018-09-15 22:29:21 +02:00
gambas
02a5a7e653 Fix mouse wheel scrolling on native widgets.
[GB.QT4]
* BUG: Fix mouse wheel scrolling on native widgets.

[GB.QT5]
* BUG: Fix mouse wheel scrolling on native widgets.
2018-09-13 13:50:13 +02:00