Commit 04475fe
committed
Enhance UI and add text swapping functionality
This commit introduces several UI improvements and new features to the `DiffCheckerScreen`:
- **Swap Text Inputs:**
- Added an `IconButton` with a `SwapVert` icon between the old and new text input fields.
- Clicking this button swaps the content of the two `OutlinedTextField`s.
- If real-time diff is enabled, the diff is recalculated after swapping.
- **TopAppBar Styling:**
- The "Diffly" title in the `TopAppBar` now uses `MaterialTheme.typography.titleLarge` with `FontWeight.Bold` and the primary color.
- A "v1.0" version text is added to the `TopAppBar` actions, styled with `MaterialTheme.typography.titleSmall` and gray color.
- **Diff Count Display:**
- In `CharDiffText.kt`, the headers "Original Text" and "Changed Text" now display a count of changed/deleted lines (e.g., "-3") and changed/added lines (e.g., "+5") respectively. These counts are color-coded (red for deletions, green for additions).
- **Layout and Spacing Adjustments:**
- Adjusted padding and spacing around UI elements like the "Real-time Diff" switch, text input fields, and the "Find Difference" button for better visual balance.
- Reduced padding within individual diff line items in `CharDiffText.kt` for a more compact display.
- **Dependency Updates:**
- Added `androidx.compose.material:material-icons-core` and `androidx.compose.material:material-icons-extended` dependencies for icon usage.
- Removed `junit` and `androidx-ui-test-junit4` version references and `junit-jupiter` library from `libs.versions.toml`.
- **IDE Configuration:**
- Added `.idea/inspectionProfiles/Project_Default.xml` to configure project-specific inspection settings, primarily related to Jetpack Compose previews.1 parent 2eb33f0 commit 04475fe
6 files changed
Lines changed: 157 additions & 29 deletions
File tree
- .idea/inspectionProfiles
- app
- src/main/java/dev/jahidhasanco/diffly/presentation
- component
- screen
- gradle
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
Lines changed: 38 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
| |||
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
60 | | - | |
| 73 | + | |
61 | 74 | | |
62 | 75 | | |
63 | 76 | | |
| |||
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
87 | 113 | | |
88 | 114 | | |
89 | 115 | | |
| |||
103 | 129 | | |
104 | 130 | | |
105 | 131 | | |
106 | | - | |
| 132 | + | |
107 | 133 | | |
108 | 134 | | |
109 | 135 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
Lines changed: 58 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
| |||
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| |||
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
48 | | - | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
56 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
57 | 71 | | |
58 | | - | |
59 | 72 | | |
60 | 73 | | |
61 | 74 | | |
62 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
63 | 84 | | |
64 | 85 | | |
65 | 86 | | |
| |||
71 | 92 | | |
72 | 93 | | |
73 | 94 | | |
74 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
75 | 98 | | |
76 | 99 | | |
77 | 100 | | |
78 | 101 | | |
79 | 102 | | |
80 | | - | |
| 103 | + | |
81 | 104 | | |
82 | 105 | | |
83 | 106 | | |
| |||
128 | 151 | | |
129 | 152 | | |
130 | 153 | | |
131 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
132 | 184 | | |
133 | 185 | | |
134 | 186 | | |
| |||
182 | 234 | | |
183 | 235 | | |
184 | 236 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | 237 | | |
189 | 238 | | |
190 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
0 commit comments