Fit the chain/params split to the chain's rows until it is dragged
The split between the chain list and the params sat at a fixed 300 px, wrong for a short chain and for a long one alike. It now rests under the chain's rows, growing with the chain up to eight stages before the list scrolls. Once the user drags it, it stays put; a double-click on the handle fits it to the rows again. GtkPaned sizes the fixed pane from its minimum height, which is only the drag floor here, so the fit is done by hand from the natural height. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,11 @@ private:
|
||||
// The check on a chain row: the stage stays where it is, and is skipped.
|
||||
void setStageEnabled(int index, bool enabled);
|
||||
void rebuildChainRows();
|
||||
// Rests the split under the chain's rows, until the user drags it.
|
||||
void scheduleChainSplitFit();
|
||||
void fitChainSplit();
|
||||
void refitChainSplit(); // the double-click on the handle
|
||||
void onChainSplitMoved();
|
||||
std::string stageLabel(std::size_t index) const;
|
||||
void selectStage(int index);
|
||||
void onStageSelected();
|
||||
@@ -146,6 +151,13 @@ private:
|
||||
StyleSet styles_;
|
||||
int selectedStage_ = 0;
|
||||
bool suspendStageSelect_ = false; // guards the rebuild of the chain rows
|
||||
// The split between the chain and the params, and where it was last put
|
||||
// to fit the rows: any other position the user reached by dragging.
|
||||
Gtk::Paned* chainSplit_ = nullptr;
|
||||
int fittedChainSplit_ = -1;
|
||||
bool chainSplitDragged_ = false;
|
||||
bool suspendSplitTrack_ = false;
|
||||
sigc::connection chainSplitFit_;
|
||||
// The name label of each chain row, renamed in place as params change.
|
||||
std::vector<Gtk::Label*> stageLabels_;
|
||||
Image result_;
|
||||
|
||||
Reference in New Issue
Block a user