Skip to content

Commit

Permalink
Increase GenerateCommitMessageDialog size and implement double click …
Browse files Browse the repository at this point in the history
…on listWidget for acceptance
  • Loading branch information
soramimi committed May 18, 2024
1 parent a7e212a commit f8ef794
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/CommitDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,6 @@ void CommitDialog::on_pushButton_generate_with_ai_clicked()
setText(text);
}
}
ui->plainTextEdit->setFocus();
}

2 changes: 1 addition & 1 deletion src/CommitDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Generate with AI</string>
<string>Generate with &amp;AI</string>
</property>
</widget>
</item>
Expand Down
37 changes: 30 additions & 7 deletions src/GenerateCommitMessageDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>689</width>
<height>145</height>
<width>763</width>
<height>193</height>
</rect>
</property>
<property name="windowTitle">
<string>Generated Commit Messages</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListWidget" name="listWidget"/>
<widget class="QListWidget" name="listWidget">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
Expand Down Expand Up @@ -75,8 +82,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>508</x>
<y>124</y>
<x>665</x>
<y>185</y>
</hint>
<hint type="destinationlabel">
<x>205</x>
Expand All @@ -91,14 +98,30 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>598</x>
<y>118</y>
<x>755</x>
<y>185</y>
</hint>
<hint type="destinationlabel">
<x>394</x>
<y>119</y>
</hint>
</hints>
</connection>
<connection>
<sender>listWidget</sender>
<signal>doubleClicked(QModelIndex)</signal>
<receiver>GenerateCommitMessageDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>219</x>
<y>84</y>
</hint>
<hint type="destinationlabel">
<x>225</x>
<y>169</y>
</hint>
</hints>
</connection>
</connections>
</ui>

0 comments on commit f8ef794

Please sign in to comment.