[Git][wxwidgets/wxwidgets][master] 5 commits: Improve initial size of wxQt dialogs

1 view
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jul 6, 2024, 9:44:16 AMJul 6
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • dcf38595
    by ali kettab at 2024-07-06T15:24:57+02:00
    Improve initial size of wxQt dialogs
    
    The default size was inappropriate for wx{File,Dir}Dialog, use their
    best size instead.
    
    See #24643.
    
  • e0509604
    by Alex Contreras at 2024-07-06T15:27:58+02:00
    Update macos-11 runners to macos-12
    
    Github has deprecated macos-11 runners; update to use the oldest
    supported runners for CI
    
    Closes #24684.
    
  • 3dcec41e
    by Vadim Zeitlin at 2024-07-06T15:28:07+02:00
    Update configure CI jobs to use macOS 12 runners too
    
    See #24684.
    
  • a99e3c31
    by Alex Shvartzkop at 2024-07-06T15:28:55+02:00
    Fix layout when not using wxCollapsiblePane in wxLogDialog
    
    Add panel to the sizer to make it actually work in this case.
    
    Closes #24679.
    
  • d53bd43d
    by Vadim Zeitlin at 2024-07-06T15:32:04+02:00
    Declare a class in WX_DECLARE_HASH_MAP() too
    
    Instead of just using a type alias, define a class inheriting from
    std::unordered_map<> in this macro, as this makes it compatible with the
    existing code not using wxUSE_STD_CONTAINERS which forward-declares hash
    map classes.
    
    And as this was already done in WX_DECLARE_HASH_SET(), it's also more
    consistent.
    
    Closes #24674.
    

5 changed files:

Changes:

  • .github/workflows/ci_cmake.yml
    ... ... @@ -66,11 +66,11 @@ jobs:
    66 66
                 runner: ubuntu-22.04
    
    67 67
                 cmake_generator: Unix Makefiles
    
    68 68
                 cmake_samples: ALL
    
    69
    -          - name: macOS 11 wxOSX
    
    70
    -            runner: macos-11
    
    69
    +          - name: macOS 12 wxOSX
    
    70
    +            runner: macos-12
    
    71 71
                 cmake_generator: Xcode
    
    72
    -          - name: macOS 11 wxIOS
    
    73
    -            runner: macos-11
    
    72
    +          - name: macOS 12 wxIOS
    
    73
    +            runner: macos-12
    
    74 74
                 cmake_generator: Xcode
    
    75 75
                 cmake_defines: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
    
    76 76
                 cmake_samples: OFF
    

  • .github/workflows/ci_mac.yml
    ... ... @@ -94,12 +94,12 @@ jobs:
    94 94
               runner: self-hosted
    
    95 95
               arch: arm64
    
    96 96
               configure_flags: --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-debug --enable-optimise
    
    97
    -        - name: wxMac macOS 11
    
    98
    -          runner: macos-11
    
    97
    +        - name: wxMac macOS 12
    
    98
    +          runner: macos-12
    
    99 99
               arch: x86_64
    
    100 100
               configure_flags: --disable-sys-libs
    
    101 101
             - name: wxiOS
    
    102
    -          runner: macos-11
    
    102
    +          runner: macos-12
    
    103 103
               arch: x86_64
    
    104 104
               configure_flags: --with-osx_iphone --enable-monolithic  --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0
    
    105 105
               configure_env: PKG_CONFIG_LIBDIR=/dev/null
    

  • include/wx/hashmap.h
    ... ... @@ -25,8 +25,14 @@
    25 25
     
    
    26 26
     #include <unordered_map>
    
    27 27
     
    
    28
    +// Use inheritance instead of simple typedef to allow existing forward
    
    29
    +// declarations of the hash map classes in the applications using wx to work.
    
    28 30
     #define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \
    
    29
    -    typedef std::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME
    
    31
    +    class CLASSNAME : public std::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > \
    
    32
    +    { \
    
    33
    +    public: \
    
    34
    +        using std::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T >::unordered_map; \
    
    35
    +    }
    
    30 36
     
    
    31 37
     #else // wxNEEDS_WX_HASH_MAP
    
    32 38
     
    

  • src/generic/logg.cpp
    ... ... @@ -775,6 +775,8 @@ wxLogDialog::wxLogDialog(wxWindow *parent,
    775 775
     #else
    
    776 776
         wxPanel* win = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
    
    777 777
                                    wxBORDER_NONE);
    
    778
    +
    
    779
    +    sizerTop->Add(win, wxSizerFlags(1).Expand().Border());
    
    778 780
     #endif
    
    779 781
         wxSizer * const paneSz = new wxBoxSizer(wxVERTICAL);
    
    780 782
     
    

  • src/qt/window.cpp
    ... ... @@ -443,8 +443,9 @@ bool wxWindowQt::Create( wxWindowQt * parent, wxWindowID id, const wxPoint & pos
    443 443
             p = pos;
    
    444 444
     
    
    445 445
         wxSize initialSize = size;
    
    446
    -    initialSize.SetDefaults( IsTopLevel() ? wxTopLevelWindowBase::GetDefaultSize()
    
    447
    -                                          : wxQtGetBestSize( GetHandle() ) );
    
    446
    +    initialSize.SetDefaults( IsTopLevel() && !GetHandle()->inherits("QDialog")
    
    447
    +                                 ? wxTopLevelWindowBase::GetDefaultSize()
    
    448
    +                                 : wxQtGetBestSize( GetHandle() ) );
    
    448 449
     
    
    449 450
         DoMoveWindow( p.x, p.y, initialSize.GetWidth(), initialSize.GetHeight() );
    
    450 451
     
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help

Reply all
Reply to author
Forward
0 new messages