@@ -60,29 +60,57 @@ class ProfilesList extends StatelessWidget {
60
60
child: const Icon (Icons .delete, color: Colors .white),
61
61
),
62
62
child: ExpansionTile (
63
- // Use ExpansionTile here
64
- title: Text (
65
- item,
66
- style: TextStyle (
67
- color: AppSettings .isDarkMode
68
- ? TaskWarriorColors .kprimaryTextColor
69
- : TaskWarriorColors .kLightPrimaryTextColor,
70
- ),
71
- ),
72
- trailing: Row (
73
- mainAxisSize: MainAxisSize .min,
63
+ // The title is now a Row to hold the text and the icon buttons
64
+ title: Row (
74
65
children: [
75
- IconButton (
76
- icon: Icon (Icons .edit,
77
- color: AppSettings .isDarkMode
78
- ? TaskWarriorColors .kprimaryTextColor
79
- : TaskWarriorColors .kLightPrimaryTextColor),
80
- onPressed: () => rename (profileId),
66
+ Expanded (
67
+ child: Expanded (
68
+ child: Column (
69
+ crossAxisAlignment: CrossAxisAlignment
70
+ .start, // Aligns text to the left
71
+ children: [
72
+ Text (
73
+ item,
74
+ style: TextStyle (
75
+ decoration: profileId == currentProfile
76
+ ? TextDecoration .underline
77
+ : TextDecoration .none,
78
+ fontSize: 16.0 , // Standard list tile title size
79
+ color: AppSettings .isDarkMode
80
+ ? TaskWarriorColors .kprimaryTextColor
81
+ : TaskWarriorColors .kLightPrimaryTextColor,
82
+ ),
83
+ ),
84
+ const SizedBox (
85
+ height:
86
+ 2.0 ), // Adds a small space between the texts
87
+ Text (
88
+ profileId,
89
+ style: TextStyle (
90
+ fontSize:
91
+ 10.0 , // Smaller font size for the subtitle
92
+ color: AppSettings .isDarkMode
93
+ ? Colors .grey[400 ]
94
+ : Colors .grey[700 ],
95
+ ),
96
+ ),
97
+ ],
98
+ ),
99
+ ),
81
100
),
82
- // The settings icon will now trigger the ExpansionTile's expansion/collapse
83
- // No need for a separate IconButton for settings if ExpansionTile handles it
84
- currentProfile != profileId
85
- ? IconButton (
101
+ // This Row holds the action buttons, keeping them separate from the tile's default trailing arrow
102
+ Row (
103
+ mainAxisSize: MainAxisSize .min,
104
+ children: [
105
+ IconButton (
106
+ icon: Icon (Icons .edit,
107
+ color: AppSettings .isDarkMode
108
+ ? TaskWarriorColors .kprimaryTextColor
109
+ : TaskWarriorColors .kLightPrimaryTextColor),
110
+ onPressed: () => rename (profileId),
111
+ ),
112
+ if (currentProfile != profileId)
113
+ IconButton (
86
114
onPressed: () {
87
115
selectProfile (profileId);
88
116
},
@@ -91,18 +119,34 @@ class ProfilesList extends StatelessWidget {
91
119
? TaskWarriorColors .kprimaryTextColor
92
120
: TaskWarriorColors .kLightPrimaryTextColor),
93
121
)
94
- : IconButton (
95
- onPressed: () {
96
- configure ();
97
- },
98
- icon: Icon (Icons .key,
99
- color: AppSettings .isDarkMode
100
- ? TaskWarriorColors .kprimaryTextColor
101
- : TaskWarriorColors .kLightPrimaryTextColor),
102
- ),
122
+ ],
123
+ ),
103
124
],
104
125
),
126
+ // By not specifying a 'trailing' widget, ExpansionTile uses its default arrow
105
127
children: < Widget > [
128
+ // The 'configure' option is now the first item inside the expandable list
129
+ if (currentProfile == profileId)
130
+ ListTile (
131
+ leading: Icon (Icons .key,
132
+ color: AppSettings .isDarkMode
133
+ ? TaskWarriorColors .kprimaryTextColor
134
+ : TaskWarriorColors .kLightPrimaryTextColor),
135
+ title: Text (
136
+ SentenceManager (
137
+ currentLanguage: AppSettings .selectedLanguage)
138
+ .sentences
139
+ .profilePageConfigureTaskserver, // New descriptive text
140
+ style: TextStyle (
141
+ color: AppSettings .isDarkMode
142
+ ? TaskWarriorColors .kprimaryTextColor
143
+ : TaskWarriorColors .kLightPrimaryTextColor,
144
+ ),
145
+ ),
146
+ onTap: () {
147
+ configure ();
148
+ },
149
+ ),
106
150
ListTile (
107
151
leading: Icon (Icons .file_copy,
108
152
color: AppSettings .isDarkMode
0 commit comments