Commit Graph

631 Commits

Author SHA1 Message Date
Twan van Laarhoven 07fe2406e7 Don't allocate wxToolBarToolBase, that can lead to memory corruption and two days of debugging. 2020-05-04 00:43:58 +02:00
Twan van Laarhoven 6c4277bd35 Fix #15, menu and toolbar icons on wxGTK 2020-05-01 12:55:43 +02:00
Twan van Laarhoven 1fb3f15aff Generate image for disabled toolbar buttons and menu items.
Fixes #13.

Removed IconMenu class, use add_menu_item/add_menu_item_tr instead.
Added _tr variants that automatically do locale translation
2020-05-01 03:26:02 +02:00
Twan van Laarhoven 8468c5bd93 Fix #9: Don't use wxWidgets' best size calculation for card and keyword lists. 2020-04-30 21:11:43 +02:00
Twan van Laarhoven 77e2ff8fd7 Fix #11: Gallery list best size: Invalidate cache and don't use DoGetBestClientSize
Revert "Cleanup: use DoGetBestClientSize"
This reverts commit 5700005243.

DoGetBestClient size is a nice idea, but it doesn't take scrollbars into account.
2020-04-30 20:35:12 +02:00
Twan van Laarhoven e74774138c Fix warnings and linker errors on gcc 2020-04-30 14:25:28 +02:00
Twan van Laarhoven a1d54f36fc Use LocalFileName class for file names inside a package. 2020-04-30 00:20:32 +02:00
Twan van Laarhoven f92c09e87a Disable hover effect on field borders for now (it causes redraw issues on some templates) 2020-04-29 21:29:01 +02:00
Twan van Laarhoven d64dee7834 Fix: images were not being loaded from zip files.
wxImage::LoadFile requires the file to be seekable to peek at the header.
We work around this by buffering the header in a wrapper class.
2020-04-28 22:46:34 +02:00
Twan van Laarhoven fd6f91e756 Warning instead of error for incorrect word-lists 2020-04-27 18:11:06 +02:00
Twan van Laarhoven 2c165271be Fix: scrolling on style and set info panels 2020-04-27 13:22:01 +02:00
Twan van Laarhoven 46b5075d7a Logo 2020-04-27 13:17:55 +02:00
Twan van Laarhoven 0f2e7ac3fe Fix uxtheme stuff on windows 2020-04-26 22:30:00 +02:00
Twan van Laarhoven af7e8c9d39 Switch (back) to our own Color type instead of using wxColour.
The reason is that wxColour's default constructor creates an invalid color (what is that even?). It is nicer to just have default be transparent.
2020-04-26 21:41:35 +02:00
Twan van Laarhoven 2e897edbbf Use toSomeType() instead of operator SomeType in ScriptValue.
This means that we are more explicit about type conversions.
Also use override specifiers for overriden virtual functions in ScriptValue.
2020-04-26 17:03:43 +02:00
Twan van Laarhoven 4bebd48786 Moved tab_index to Style (instead of Field), it makes more sense there, since it pertains to the layout of stuff on the card.
Also don't precalculate list of fields sorted by tab order, just find the next/previous ones on the fly.
2020-04-26 02:16:39 +02:00
Twan van Laarhoven 54a3cbfde3 Replace include guards by #pragma once 2020-04-26 01:25:16 +02:00
Twan van Laarhoven bad9981ad9 Cleaned up copyright block.
Removed the year so we don't get tempted to change this ever again.
2020-04-26 01:11:14 +02:00
Twan van Laarhoven 4327abb803 Remove DECLARE_TYPEOF
It is no longer needed since C++11
2020-04-26 00:51:16 +02:00
Twan van Laarhoven 5e92d9455c Code cleanup: remove messy spaces before line continuation (\) in macros 2020-04-26 00:37:13 +02:00
Twan van Laarhoven 5d4c3402df Added fancy mouseover effect to field borders.
This might be slow, if this becomes a problem I could add a setting to disable it.
2020-04-25 23:59:56 +02:00
Twan van Laarhoven 37c8641641 Replace scoped_ptr by unique_ptr 2020-04-25 22:28:32 +02:00
Twan van Laarhoven b7ed93cd02 Remove dependency on boost::random, since that is now in std 2020-04-25 22:22:15 +02:00
Twan van Laarhoven 0d42df1537 Fix type conversion errors in GCC/wxGTK 2020-04-25 22:20:51 +02:00
Twan van Laarhoven 64ea1d7322 Clean up pointer use:
* Use unique_ptr for Actions instead of manual memory management
 * Use unique_ptr in KeywordDatabase
 * Use unique_ptr instead of shared_ptr for file formats
 * Don't pass shared_ptr to Reader/Writer, use references instead
Also
 * Switch to C++17 so we can use map::try_emplace
2020-04-25 22:20:51 +02:00
Twan van Laarhoven 708b4389a0 Use make_intrusive/make_shared for smart pointer construction. 2020-04-25 22:20:51 +02:00
Twan van Laarhoven 4258ce1c6c Remove AColor class, because wxColour now supports alpha values. 2020-04-25 22:20:50 +02:00
Twan van Laarhoven 0ca2c70310 Add keyboard navigation and history to console panel. 2020-04-23 22:02:13 +02:00
Twan van Laarhoven 257c82ed90 Tweak spacing on keywords panel 2020-04-23 21:20:40 +02:00
Twan van Laarhoven e9456eea86 Fix: refresh list also when changes are made to item 0 2020-04-23 19:59:47 +02:00
Twan van Laarhoven a585fc40cc Remove some useless "typedef wxX X" 2020-04-22 23:58:01 +02:00
Twan van Laarhoven 713a9e4a40 Use underscores instead of spaces for all internal names. And renamed some script functions at the same time.
* cannocial_name_form now outputs "_", where it used to use " "
* this simplifies reflectio and scripting code, because now C++ names are also MSE internal names
* added 'caption' property to fields. This is used instead of the name in NativeLookEditor, since the latter will now contain underscores.
* renamed text related script functions for consistency, since we were touching that part of the code anyway.
2020-04-22 23:48:26 +02:00
Twan van Laarhoven 25345b86bd Fix: use radians instead of degrees 2020-04-21 21:42:44 +02:00
Twan van Laarhoven 39f504ad90 Sstrip special characters from set name before showing save file dialog 2020-04-21 01:13:11 +02:00
Twan van Laarhoven 294c12b180 Remove space below tab bar, it has repaint issues and wastes space 2020-04-21 01:04:58 +02:00
Twan van Laarhoven e72909f430 Remember contents of filter control when switching tabs 2020-04-21 00:10:17 +02:00
Twan van Laarhoven 4889f0b7e8 Renamed --export to --export-image
Added new --export command line argument for exporting using a scripted/html export template.
2020-04-21 00:01:59 +02:00
Twan van Laarhoven 1c9139a490 Console panel sets "card" variable to selected card 2020-04-18 21:44:02 +02:00
Twan van Laarhoven e464327e69 filter ctrl: don't force height 2020-04-18 19:12:52 +02:00
Twan van Laarhoven efa1db8789 Fix text on about window 2020-04-16 21:03:07 +02:00
Twan van Laarhoven 0706ecae13 Fix wxGTK warnings about GetScrollPos on window without scrollbar 2020-04-16 19:29:46 +02:00
Twan van Laarhoven 40a84687c7 Fixed some gcc warnings 2020-04-16 00:45:43 +02:00
Twan van Laarhoven 12715e3845 Fix sizer: wxGROW+center alignment not allowed 2020-04-10 17:44:03 +02:00
Twan van Laarhoven 482c7103ed Fix index out of bounds error 2020-04-10 17:27:04 +02:00
Twan van Laarhoven 5700005243 Cleanup: use DoGetBestClientSize 2020-04-10 16:57:21 +02:00
Twan van Laarhoven 25fd7dc079 Fix: separate menu for export from toolbar 2020-04-10 16:56:54 +02:00
Twan van Laarhoven be9bae942e Fix empty bitmap issue
Fix: invalidate best size cache that is used in newer wxWidgets versions
2020-04-10 16:56:07 +02:00
Twan van Laarhoven 9e6cfe9b7e Fix: wxFlexGridSizer doesn't like center alignment with wxEXPAND 2020-04-10 14:46:53 +02:00
Twan van Laarhoven 35a89676b4 CMake file
Update to C++ 11: std::shared_ptr, for each loops
Update to wxWidgets 3.0+
2020-04-08 01:10:01 +02:00
Lymia Aluysia aa39a9bc71 Make PNG the default export format. 2017-01-24 10:49:14 -06:00