mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 12:02:48 +01:00
Fix the background color of the query term scroll area on OS X
This commit is contained in:
parent
5bdfa1573f
commit
eed126f7cd
@ -19,6 +19,11 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#terms_scroll_area, #terms_scroll_area_content {
|
||||
background: transparent;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
@ -69,11 +74,8 @@
|
||||
<string>Search terms</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="terms_scrollArea">
|
||||
<widget class="QScrollArea" name="terms_scroll_area">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -86,13 +88,13 @@
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="terms_scrollArea_content">
|
||||
<widget class="QWidget" name="terms_scroll_area_content">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>422</width>
|
||||
<height>264</height>
|
||||
<width>418</width>
|
||||
<height>251</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -108,12 +108,12 @@ int QueryWizardPlugin::CreatePages(QWizard* wizard, int finish_page_id) {
|
||||
connect(search_page_->new_term_, SIGNAL(Clicked()), SLOT(AddSearchTerm()));
|
||||
|
||||
// Add an empty initial term
|
||||
search_page_->layout_ = static_cast<QVBoxLayout*>(search_page_->ui_->terms_scrollArea_content->layout());
|
||||
search_page_->layout_ = static_cast<QVBoxLayout*>(search_page_->ui_->terms_scroll_area_content->layout());
|
||||
search_page_->layout_->addWidget(search_page_->new_term_);
|
||||
AddSearchTerm();
|
||||
|
||||
// Ensure that the terms are scrolled to the bottom when a new one is added
|
||||
connect(search_page_->ui_->terms_scrollArea->verticalScrollBar(), SIGNAL(rangeChanged(int,int)), this, SLOT(MoveTermListToBottom(int, int)));
|
||||
connect(search_page_->ui_->terms_scroll_area->verticalScrollBar(), SIGNAL(rangeChanged(int,int)), this, SLOT(MoveTermListToBottom(int, int)));
|
||||
|
||||
// Add the preview widget at the bottom of the search terms page
|
||||
QVBoxLayout* terms_page_layout = static_cast<QVBoxLayout*>(search_page_->layout());
|
||||
@ -299,7 +299,7 @@ Search QueryWizardPlugin::MakeSearch() const {
|
||||
|
||||
void QueryWizardPlugin::SearchTypeChanged() {
|
||||
const bool all = search_page_->ui_->type->currentIndex() == 2;
|
||||
search_page_->ui_->terms_scrollArea_content->setEnabled(!all);
|
||||
search_page_->ui_->terms_scroll_area_content->setEnabled(!all);
|
||||
|
||||
UpdateTermPreview();
|
||||
}
|
||||
@ -308,7 +308,7 @@ void QueryWizardPlugin::MoveTermListToBottom(int min, int max) {
|
||||
Q_UNUSED(min);
|
||||
// Only scroll to the bottom if a new term is added
|
||||
if (previous_scrollarea_max_ < max)
|
||||
search_page_->ui_->terms_scrollArea->verticalScrollBar()->setValue(max);
|
||||
search_page_->ui_->terms_scroll_area->verticalScrollBar()->setValue(max);
|
||||
|
||||
previous_scrollarea_max_ = max;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user