A viewport can be simply explained with this analogy. Think of it as a piece of paper for which you can draw things on. Any sprites assigned to this viewport will only be displayed if it lies within the boundaries of the paper (cuz duh, if you draw a line through the paper and onto the desk, your line on the desk isn't going to move with the paper).
Changing the viewport's settings, like you did, is just changing the drawing surface area for your objects to be placed upon. What you want to change is the height of your windows.
You want to look in part 3 and find the classes Window_Skill_Hotkey and Window_Item_Hotkey. You will see in the initialize methods something like
self.width, self.height = 320, 416
Looking at your image, it seems the 13th item is cut off.
416 = 32 * 13
If you want the window to only show 12 items at once, do the math:
32 * 12 = 384
Set your height to that.