File tree Expand file tree Collapse file tree 2 files changed +29
-20
lines changed
Expand file tree Collapse file tree 2 files changed +29
-20
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ def _build_faq_card(
150150 card .viewLayout .setContentsMargins (20 , 12 , 20 , 18 )
151151 card .viewLayout .addWidget (answer )
152152 card ._adjustViewSize ()
153+ card .expandAni .finished .connect (lambda c = card : self ._finalize_faq_card_height (c ))
153154 self ._faq_cards .append (card )
154155 return card
155156
@@ -172,5 +173,12 @@ def _update_faq_card_sizes(self) -> None:
172173 for card in self ._faq_cards :
173174 card ._adjustViewSize ()
174175 card .adjustSize ()
176+ self ._finalize_faq_card_height (card )
175177 if hasattr (self , "content" ):
176178 self .content .adjustSize ()
179+
180+ def _finalize_faq_card_height (self , card : ExpandSettingCard ) -> None :
181+ if card .isExpand :
182+ return
183+ card .verticalScrollBar ().setValue (card .verticalScrollBar ().maximum ())
184+ card .setFixedHeight (card .card .height ())
Original file line number Diff line number Diff line change @@ -125,26 +125,27 @@ def build_app_stylesheet(is_dark: bool) -> str:
125125 border-radius: 14px;
126126}}
127127
128- QGroupBox {{
129- border: 1px solid { border } ;
130- border-radius: 12px;
131- margin-top: 16px;
132- padding: 14px 14px 14px 14px;
133- font-size: 16px;
134- font-weight: 700;
135- color: { title } ;
136- background: { card_bg_alt } ;
137- }}
138-
139- QGroupBox::title {{
140- subcontrol-origin: margin;
141- left: 12px;
142- padding: 0 8px;
143- color: { title } ;
144- font-size: 16px;
145- font-weight: 700;
146- background: transparent;
147- }}
128+ QGroupBox {{
129+ border: 1px solid { border } ;
130+ border-radius: 12px;
131+ margin-top: 0px;
132+ padding: 36px 14px 14px 14px;
133+ font-size: 16px;
134+ font-weight: 700;
135+ color: { title } ;
136+ background: { card_bg_alt } ;
137+ }}
138+
139+ QGroupBox::title {{
140+ subcontrol-origin: padding;
141+ subcontrol-position: top left;
142+ left: 0px;
143+ padding: 0;
144+ color: { subtext } ;
145+ font-size: 14px;
146+ font-weight: 600;
147+ background: transparent;
148+ }}
148149
149150BodyLabel, CaptionLabel, TitleLabel, SubtitleLabel {{
150151 color: { text } ;
You can’t perform that action at this time.
0 commit comments