소스 검색

Channel settings window: its proportions constrainer keeps the title on screen, as ResizableWindow's own (round 190he)

Ka1-S 2 주 전
부모
커밋
0a07bbb3a8
1개의 변경된 파일과 5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/ui/ChannelSettings.cpp

+ 5 - 1
src/ui/ChannelSettings.cpp

@@ -6561,7 +6561,10 @@ private:
 class PageAspectConstrainer final : public juce::ComponentBoundsConstrainer
 {
 public:
-    explicit PageAspectConstrainer (juce::ResizableWindow& w) : window (w) {}
+    explicit PageAspectConstrainer (juce::ResizableWindow& w) : window (w)
+    {
+        setMinimumOnscreenAmounts (0x10000, 16, 24, 16); // (as ResizableWindow's own constrainer: the title stays reachable)
+    }
     std::function<juce::Point<int>()> pageSize;
     std::function<void()> onResizeEnd; // (the size is remembered once, when the drag ends)
 
@@ -6596,6 +6599,7 @@ public:
             bounds.setTop (bounds.getBottom() - newH);
         else
             bounds.setHeight (newH);
+        juce::ComponentBoundsConstrainer::checkBounds (bounds, previous, limits, top, left, bottom, right); // (on screen)
     }
 
 private: