Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#639: Set the min-size of the input area and info area #646

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lidaobing
Copy link
Member

@lidaobing lidaobing commented Dec 27, 2024

Summary by Sourcery

Set the minimum size for the input and info areas in dialogs.

Enhancements:

  • Set a minimum height for the input area.
  • Set a minimum width for the info area.

Copy link

sourcery-ai bot commented Dec 27, 2024

Reviewer's Guide by Sourcery

This PR sets the minimum size of the input area and info area in the dialog to improve usability. It removes unnecessary includes and sets minimum sizes for these areas using gtk_widget_set_size_request.

Class diagram showing DialogPeer and DialogBase modifications

classDiagram
    class DialogBase {
      +CreateInputArea(): GtkWidget*
      -InputAreaMinHeight: int
    }
    class DialogPeer {
      +CreateAllArea(): GtkWidget*
      +CreateInfoArea(): GtkWidget*
      -InfoAreaMinWidth: int
    }
    DialogBase <|-- DialogPeer
    note for DialogBase "Added InputAreaMinHeight constant (50)"
    note for DialogPeer "Added InfoAreaMinWidth constant (100)"
Loading

File-Level Changes

Change Details Files
Set minimum size for the input area
  • Added InputAreaMinHeight enum and set it to 50.
  • Used gtk_widget_set_size_request to set the minimum height of the input area frame to InputAreaMinHeight.
src/iptux/DialogBase.cpp
Set minimum size for the info area and remove unnecessary frame
  • Added InfoAreaMinWidth enum and set it to 100.
  • Used gtk_widget_set_size_request to set the minimum width of the info area to InfoAreaMinWidth.
  • Removed the frame around the info area scrolled window.
  • Set margins for the info text view widget.
  • Removed unnecessary cinttypes include.
  • Changed the pack2 parameters for the input and info areas to FALSE, FALSE to allow them to shrink less.
src/iptux/DialogPeer.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @lidaobing - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

github-actions bot commented Dec 27, 2024

Test Results

0 tests   - 66   0 ✅  - 66   0s ⏱️ -4s
0 suites  - 32   0 💤 ± 0 
0 files    -  1   0 ❌ ± 0 

Results for commit f676a8e. ± Comparison against base commit a926505.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.47%. Comparing base (f0224d4) to head (ad4e600).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #646   +/-   ##
=======================================
  Coverage   52.47%   52.47%           
=======================================
  Files          64       64           
  Lines        8557     8557           
=======================================
  Hits         4490     4490           
  Misses       4067     4067           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant