~tpeeters/ubuntu-ui-toolkit/tabBar-selectionMode-fix

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml

  • Committer: tpeeters
  • Date: 2013-11-19 13:25:58 UTC
  • Revision ID: tim.peeters@canonical.com-20131119132558-gescu7lc84k1y4ij
debugging

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
                                                buttonView.selectedButtonIndex === button.buttonIndex
111
111
                    property real offset: theRow.rowNumber + 1 - button.x / theRow.width;
112
112
                    onOffsetChanged: {
 
113
                        print("offset "+buttonIndex+" = "+offset)
113
114
                        if (selected) {
114
115
                            buttonView.updateOffset(button.offset);
115
116
                        }
184
185
                            baseline: parent.bottom
185
186
                            baselineOffset: -headerTextBottomMargin
186
187
                        }
187
 
                        text: (model.hasOwnProperty("tab") && tab.hasOwnProperty("title")) ? tab.title : title
 
188
                        text: (model.hasOwnProperty("tab") && tab.hasOwnProperty("title")) ? tab.title +">"+button.buttonIndex: title
188
189
                        fontSize: headerFontSize
189
190
                        font.weight: headerFontWeight
190
191
                        style: headerTextStyle
248
249
                x: buttonView.buttonRowWidth*1.5
249
250
            }
250
251
        }
 
252
        onOffsetChanged: print("updating offset to "+offset)
251
253
 
252
254
        // x - y (mod a), for (x - y) <= a
253
255
        function cyclicDistance(x, y, a) {
287
289
        }
288
290
 
289
291
        Component.onCompleted: {
 
292
            print("initial offset = "+offset);
290
293
            selectButton(styledItem.selectedIndex);
291
294
        }
292
295